addDaysToDate ( date: Date, days: Number )

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to add days to (optional - if omitted the current date is used)

days Number

Days to add

addHoursToDate ( date: Date, hours: Number )

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to add hours to (optional - if omitted the current date is used)

hours Number

Hours to add

addMinutesToDate ( date: Date, minutes: Number )

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to add hours to (optional - if omitted the current date is used)

minutes Number

Hours to add

diff ( date1: Date, date2: Date, unit: String ) →{ number }

@memberof DateFunctions

Parameters
Name Type Description
date1 Date

First date

date2 Date

Second date

unit String

The unit of the result can be either ms, s, m, h or d (default is ms)

formatDate ( date: Date, datePattern: String , timePattern: String ) →{ String }

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to format (optional - current date is used if omitted)

datePattern String

Date formatting-pattern

timePattern String

Time formatting-pattern

Returns

formatted date

formatTime ( date: Date, timePattern: String )

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to format (optional - current date is used if omitted)

timePattern String

Pattern to format time according to

getDate ( )

@memberof DateFunctions

getDayInMonth ( date: Date)

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to get day from (optional - current date is used if omitted)

getDayInWeek ( date: Date)

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to get day in week from (optional - current date is used if omitted)

getEndOfMonth ( date: Date)

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to get end of month from (optional - current date is used if omitted)

getHour ( date: Date)

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to get hour from (optional - current date is used if omitted)

getLastDayInMonth ( date: Date)

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to get last daye in month from (optional - current date is used if omitted)

getLastMondayFromDate ( date: Date)

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to get monday of week from (optional - current date is used if omitted)

getMinute ( date: Date)

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to get hour from (optional - current date is used if omitted)

getMondayFromWeek ( week: Number , year: Number )

@memberof DateFunctions

Parameters
Name Type Description
week Number

Number Week week to get monday for

year Number

Year year to get monday for

getMonth ( date: Date)

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to get Month from (optional - current date is used if omitted)

getSecond ( date: Date)

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to get hour from (optional - current date is used if omitted)

getWeek ( date: Date)

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to get week from (optional - current date is used if omitted)

getYear ( date: Date)

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to get year from (optional - current date is used if omitted)

newDate ( date: Date, timezone: String )

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date(optional - current date is used if omitted)

timezone String

String timezone (optional - current timezone is used if omitted)

toMidnight ( date: Date)

@memberof DateFunctions

Parameters
Name Type Description
date Date

Date to get midnight for (optional - if omitted the current date is used)