xtd - Reference Guide 0.2.0
xtd::time_zone_info::adjustement_rule Class Reference

#include <time_zone_info.h>


Provides information about a time zone adjustment, such as the transition to and from daylight saving time.

class adjustement_rule : public xtd::iequatable<adjustement_rule>, public xtd::object
xtd::object → xtd::adjustement_rule
xtd::iequatable <>
The xtd::time_zone_info::adjustment_rule class defines the effective start and end dates of a particular time change to and from daylight saving time, respectively, as well as its delta (the exact amount by which the adjustment causes the time zone's standard time to change). In addition, two properties return xtd::txtd::time_zone_info::transition_time objects that define when each transition to and from standard time occurs.
An instance of the xtd::time_zone_info::adjustment_rule class is immutable. Once an object has been created, its values cannot be modified.
To create a xtd::time_zone_info::adjustment_rule object, call the static xtd::time_zone_info::adjustment_rule::create_adjustment_rule method. You can then supply an array of xtd::time_zone_info::adjustment_rule objects to two of the overloads of the xtd::time_zone_info::create_custom_time_zone method. To retrieve the adjustment rules of a particular time zone, call its xtd::time_zone_info::get_adjustment_rules method, which returns an array of xtd::time_zone_info::adjustment_rule objects.


const xtd::date_timedate_end () const noexcept
const xtd::date_timedate_start () const noexcept
xtd::ticks daylight_delta () const noexcept
transition_time daylight_transition_end () const noexcept
transition_time daylight_transition_start () const noexcept


bool equals (const adjustement_rule &ar) const noexcept override
bool equals (const object &obj) const noexcept override
 Determines whether the specified object is equal to the current object. More...

Additional Inherited Members

- Public Member Functions inherited from xtd::iequatable< adjustement_rule >
virtual bool equals (const adjustement_rule &) const noexcept=0
 Indicates whether the current object is equal to another object of the same type. More...
- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type. More...
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const
 Gets the type of the current instance. More...
virtual xtd::ustring to_string () const noexcept
 Returns a sxd::ustring that represents the current object. More...
- 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. More...
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...

Member Function Documentation

◆ equals()

bool xtd::time_zone_info::adjustement_rule::equals ( const object obj) const

Determines whether the specified object is equal to the current object.

objThe object to compare with the current object.
true if the specified object is equal to the current object. otherwise, false.
The following code example compares the current instance with another object.

Reimplemented from xtd::object.

The documentation for this class was generated from the following file: