Dates manipulation
Dates manipulation
toDate(localDateTime)
Obtain date type from string date representation with format YYYY-MM-DDThh:mm:ssTZD.
Kind: global function
Returns: Date
| Param | Type | Description |
|---|---|---|
| localDateTime | string | Date string representation with format YYYY-MM-DDThh:mm:ssTZD. |
Example of use:
getDailyResetDate()
Obtains date to reset daily counters.
This function returns date with current date, but with 00:00:00 hours.
Kind: global function
Returns: Date
Example of use:
getDailyResetDateWithZuluHour(hour)
Obtains date to reset daily counters with defined hour in gmt+0.
Kind: global function
Returns: Date
| Param | Type | Description |
|---|---|---|
| hour | string | Hour in format HH:mm:ss. |
Example of use:
This function returns date with current date, but with 2:00:00 hours. For example, if current day is 2021-06-30, the returned date in previously called function is 2021-06-30T02:00:00Z
getMonthlyResetDate()
Obtains date to reset monthly counters.
This function returns date with first day of current month and 00:00:00 hours.
Kind: global function
Returns: Date
Example of use:
getMonthlyResetDateWithZuluHour(hour)
Obtains date to reset monthly counters with defined hour in gmt+0.
Kind: global function
Returns: Date
| Param | Type | Description |
|---|---|---|
| hour | string | Hour in format HH:mm:ss. |
This function returns date with first day of current month, but with 2:00:00 hours. For example, if current day is 2021-06-30, the returned date in previously called function is 2021-06-01T02:00:00Z
getMonthlyResetDateWithZuluHourAndDayOfMonth(hour, dayOfMonth)
Obtains date to reset monthly counters with defined hour in gmt+0.
Kind: global function
Returns: Date
| Param | Type | Description |
|---|---|---|
| hour | string | Hour in format HH:mm:ss. |
| dayOfMonth | number | Day of Month. |
This function returns date of the day 21 of current month, but with 2:00:00 hours, when day of the month is null, then return first day of the month. For example, the returned date in previously called function is 2023-02-21T02:00:00Z