Handle timezones
- Source:
Methods
(inner) processTimezone()
- Source:
(inner) shiftTime(to, time) → {Object}
Return the equivalent date-time in a different timezone
- Source:
Parameters:
Name | Type | Description |
---|---|---|
to |
String
|
the target timezone |
time |
Object
|
(optional) the date-time (now() if not present)
|
Returns:
- Type:
-
Object
the equivalent date-time
(inner) timezoneExists(tz) → {Boolean}
Check if a string corresponds to a known timezone
- Source:
Parameters:
Name | Type | Description |
---|---|---|
tz |
String
|
the string |
Returns:
- Type:
-
Boolean
whether it's a valid timezone