Returns this date's elapsed fraction of the specified unit (between 0 and 1).
Usage | Returns |
---|---|
Date.getFraction(unit, timeZone) | Float |
Argument | Type | Details |
---|---|---|
this: date | Date | |
unit | String | One of 'year', 'month' 'week', 'day', 'hour', 'minute', or 'second'. |
timeZone | String, default: null | The time zone (e.g. 'America/Los_Angeles'); defaults to UTC. |