Timezone
Type class
A named timezone, such as "America/New_York", used for root.timezone.
Sources
Timezone can be used (imported) via one of the following packages.
// Import Timezoneimport * as am5 from "@amcharts/amcharts5";
// Create Timezoneam5.Timezone.new(root, { // ... config if applicable});<!-- Load Timezone --><script src="index.js"></script>
<script>// Create Timezoneam5.Timezone.new(root, { // ... config if applicable});</script>Inheritance
Timezone does not extend any other symbol.
Timezone is not extended by any other symbol.
Properties
nameType
string|undefinedThe IANA name of the timezone.
Methods
constructor(timezone:string|undefined,
isReal:boolean)Returns
TimezoneconvertLocal(date:Date)Returns
DateReturns a copy of
dateshifted so that its local time reads as the time in this timezone.new(timezone:string|undefined)StaticReturns
TCreates a timezone from its IANA name, such as
"America/New_York".More info: Getting started: new element syntax
offsetUTC(date:Date)Returns
numberReturns the timezone's offset from UTC at
date, in minutes, signed asDate.getTimezoneOffset()is: positive west of UTC.parseDate(date:Date)Returns
ParsedDateReturns the parts of
dateas seen in this timezone: year, month (from0), day, hour, minute, second, millisecond and weekday (0for Sunday).
Events
Timezone does not have any events.