Returns the specified unit of this date.
Usage | Returns |
---|---|
Date.get(unit, timeZone) | Long |
Argument | Type | Details |
---|---|---|
this: date | Date | |
unit | String | One of 'year', 'month' (returns 1-12), 'week' (1-53), 'day' (1-31), 'hour' (0-23), 'minute' (0-59), or 'second' (0-59). |
timeZone | String, default: null | The time zone (e.g. 'America/Los_Angeles'); defaults to UTC. |