xtd 0.2.0
Loading...
Searching...
No Matches

◆ date_start()

const xtd::date_time & xtd::time_zone_info::adjustement_rule::date_start ( ) const
noexcept

Gets the date when the adjustment rule takes effect.

Returns
A xtd::date_time value that indicates when the adjustment rule takes effect.
Remarks
The value of the xtd::time_zone_info::adjustement_rule::date_start property is a date value without a time component. It defines the date on which a particular adjustment rule goes into effect. This is the date in which a set of transitions (which typically are defined by one transition to daylight savings time and one transition back to standard time) go into effect. For example, an adjustment rule might go into effect on January 1, 2017, that provides for a transition to daylight savings time on the second Sunday of March and for a transition back to standard time on the first Sunday of November. Note that the starting date of the adjustment rule is not tied to the date of the first transition.
You can assign
date_time::min_value().date() 
to the xtd::time_zone_info::adjustement_rule::date_end property when you create a custom adjustment rule for use in a time zone-aware application that does not have to work with historic time zone information.
Warning
Unless there is a compelling reason to do otherwise, you should define the adjustment rule's start date to occur within the time interval during which the time zone observes standard time. Unless there is a compelling reason to do so, you should not define the adjustment rule's start date to occur within the time interval during which the time zone observes daylight saving time. For example, if a time zone's transition from daylight saving time occurs on the third Sunday of March and its transition to daylight saving time occurs on the first Sunday of October, the effective start date of the adjustment rule should not be January 1 of a particular year, since that date occurs within the period of daylight saving time.