Data Class Added Methods Reference

UpviseJS adds some static method to the standard Javascript Date class

Date.MINUTE

property expressing 1 minute in milliseconds, = 60000

Date.HOUR

property expressing 1 hour in milliseconds, = 60*60000

Date.DAY

property expressing 1 day in milliseconds, = 24*60*60000

Date.now()

Returns the current date time on the device. (epoch time). This is a shortcut for the standard javascript call new Date().getTime();

Date.today()

Returns today date at 00:00 in epoc format

Date.month()

Returns the date of the first day of the current momth at 00:00 in epoch time;

var monthstart = Date.month();

Date.addDays = function (millisec, nbdays)

Adds a number of days to a date.
var tomorrow = Date.addDays(Date.today(), 1);
var nextweek = Date.addDays(Date.today(), 7);

Date.addMonths = function (millisec, nbmonths)

Adds a number of months to a date.

var nextmonth = Date.addMonth(Date.month(), 1);