TimeZoneRuleConverter class
Converts between timezone package [tz.Location]s (the Dart-side TimeZoneInfo)
and adjustment rules.
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
Static Methods
-
DaysInMonth(int year, int month)
→ int
-
Gets the number of days in a month.
-
FromLocation(Location location, {int startYear = 1970})
→ TimeZoneRuleSet
-
Derives adjustment rules from the transitions of a [tz.Location], the way
TimeZoneInfo.GetAdjustmentRules() describes a Windows time zone. Years with
exactly one switch to and one switch back from daylight saving time become
recurring rules (merged across consecutive years when they recur identically);
any other offset change is kept exactly, as a rule starting at that moment.
-
ToLocation(String name, TimeZoneRuleSet ruleSet, {String standardName = "Standard", String daylightName = "Daylight", int firstYear = DefaultFirstYear, int lastYear = DefaultLastYear})
→ Location
-
Builds a [tz.Location] that observes the specified rules. Rules apply from
DateTime.MinValue to DateTime.MaxValue in .NET; a Location needs explicit
transitions, so they are generated from [firstYear] to [lastYear].
Constants
-
DefaultFirstYear
→ const int
-
The first year for which transitions are generated by [ToLocation].
-
DefaultLastYear
→ const int
-
The last year for which transitions are generated by [ToLocation].