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

◆ create_fixed_date_rule()

static transition_time xtd::time_zone_info::transition_time::create_fixed_date_rule ( date_time  time_of_day,
uint32  month,
uint32  day 
)
static

Defines a time change that uses a fixed-date rule (that is, a time change that occurs on a specific day of a specific month).

Parameters
time_of_dayThe time at which the time change occurs. This parameter corresponds to the xtd::time_zone_info::transition_time::ttime_of_day property.
monthThe month in which the time change occurs. This parameter corresponds to the xtd::time_zone_info::transition_time::month property.
dayThe day of the month on which the time change occurs. This parameter corresponds to the xtd::time_zone_info::transition_time::day property.
Returns
Data about the time change.
Exceptions
xtd::argument_exceptionThe time_of_day parameter has a non-default date component.
-or-
The time_of_day parameter's Kind property is not unspecified.
-or-
The time_of_day parameter does not represent a whole number of milliseconds.
xtd::argument_out_of_range_exceptionThe month parameter is less than 1 or greater than 12.
-or-
The day parameter is less than 1 or greater than 31.
Remarks
This method creates a fixed-date rule (that is, a time change that occurs on a specific day of a specific month). For example, a time change that always occurs on October 28 follows a fixed-date rule.
For transitions from standard time to daylight saving time, the timeOfDay argument represents the time of the transition in the time zone's standard time. For transitions from daylight saving time to standard time, it represents the time of the transition in the time zone's daylight saving time. Note that this is a xtd::date_time value whose year, month, and date values must all equal 1.