Provides information about a specific time change, such as the change from daylight saving time to standard time or vice versa, in a particular time zone.
Public Properties | |
uint32 | day () const noexcept |
Gets the day on which the time change occurs. | |
xtd::day_of_week | day_of_week () const noexcept |
Gets the day of the week on which the time change occurs. | |
bool | is_fixed_rule () const noexcept |
Gets a value indicating whether the time change occurs at a fixed date and time (such as November 1) or a floating date and time (such as the last Sunday of October). | |
uint32 | month () const noexcept |
Gets the month in which the time change occurs. | |
xtd::date_time | time_of_day () const noexcept |
Gets the hour, minute, and second at which the time change occurs. | |
uint32 | week () const noexcept |
Gets the week of the month in which a time change occurs. | |
Public Static Methods | |
bool | equals (const transition_time &tt) const noexcept override |
static transition_time | create_fixed_date_rule (date_time time_of_day, uint32 month, uint32 day) |
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). | |
static transition_time | create_floating_date_rule (date_time time_of_day, uint32 month, uint32 week, xtd::day_of_week day_of_week) |
Defines a time change that uses a floating-date rule (that is, a time change that occurs on a specific day of a specific week of a specific month). | |
Additional Inherited Members | |
Public Member Functions inherited from xtd::iequatable< transition_time > | |
virtual bool | equals (const transition_time &) const noexcept=0 |
Indicates whether the current object is equal to another object of the same type. | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. | |
virtual type_object | get_type () const noexcept |
Gets the type of the current instance. | |
template<typename object_t > | |
std::unique_ptr< object_t > | memberwise_clone () const noexcept |
Creates a shallow copy of the current object. | |
virtual xtd::ustring | to_string () const noexcept |
Returns a sxd::ustring that represents the current object. | |
Static Public Member Functions inherited from xtd::object | |
static bool | equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |
|
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).
time_of_day | The time at which the time change occurs. This parameter corresponds to the xtd::time_zone_info::transition_time::ttime_of_day property. |
month | The month in which the time change occurs. This parameter corresponds to the xtd::time_zone_info::transition_time::month property. |
day | The day of the month on which the time change occurs. This parameter corresponds to the xtd::time_zone_info::transition_time::day property. |
xtd::argument_exception | The 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_exception | The month parameter is less than 1 or greater than 12. -or- The day parameter is less than 1 or greater than 31. |
|
static |
Defines a time change that uses a floating-date rule (that is, a time change that occurs on a specific day of a specific week of a specific month).
time_of_day | The time at which the time change occurs. This parameter corresponds to the xtd::time_zone_info::transition_time::ttime_of_day property. |
month | The month in which the time change occurs. This parameter corresponds to the xtd::time_zone_info::transition_time::month property. |
week | The week of the month in which the time change occurs. Its value can range from 1 to 5, with 5 representing the last week of the month. This parameter corresponds to the xtd::time_zone_info::transition_time::week property |
day_of_week | The day of the week on which the time change occurs. This parameter corresponds to the xtd::time_zone_info::transition_time::day_of_week property. |
xtd::argument_exception | The 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_exception | The month parameter is less than 1 or greater than 12. -or- The week parameter is less than 1 or greater than 5. |
|
noexcept |
Gets the day on which the time change occurs.
|
noexcept |
Gets the day of the week on which the time change occurs.
|
noexcept |
Gets a value indicating whether the time change occurs at a fixed date and time (such as November 1) or a floating date and time (such as the last Sunday of October).
transition_time property | is_fixed_date_rule = true | is_fixed_date_rule = false |
---|---|---|
uint32 day() const noexcept Gets the day on which the time change occurs. | Valid | Unused |
Unused | Valid | |
uint32 week() const noexcept Gets the week of the month in which a time change occurs. | Unused | Valid |
uint32 month() const noexcept Gets the month in which the time change occurs. | Valid | Valid |
xtd::date_time time_of_day() const noexcept Gets the hour, minute, and second at which the time change occurs. | Valid | Valid |
|
noexcept |
Gets the month in which the time change occurs.
|
noexcept |
Gets the hour, minute, and second at which the time change occurs.
|
noexcept |
Gets the week of the month in which a time change occurs.
If the Week property value is | The transition occurs on |
---|---|
1 | The first occurrence of the xtd::time_zone_info::transition_time::day_of_week value in xtd::time_zone_info::transition_time::month. |
2 | The second occurrence of the xtd::time_zone_info::transition_time::day_of_week value in xtd::time_zone_info::transition_time::month. |
3 | The third occurrence of the xtd::time_zone_info::transition_time::day_of_week value in xtd::time_zone_info::transition_time::month. |
4 | The fourth occurrence of the xtd::time_zone_info::transition_time::day_of_week value in xtd::time_zone_info::transition_time::month. |
5 | The last occurrence of the xtd::time_zone_info::transition_time::day_of_week value in xtd::time_zone_info::transition_time::month. |