|
| bool | isLeapYear () const |
| | Checks if this year is a leap year.
|
| |
| weekdays | weekday () const |
| | Gets weekday for this date.
|
| |
| | UTCTime () |
| | Constructs a UTCTime object representing the epoch (1970-01-01 00:00:00 UTC)
|
| |
| | UTCTime (integer year, integer month, integer day) |
| | Constructs a UTCTime object with specified date components (time set to 00:00:00)
|
| |
| | UTCTime (integer year, integer month, integer day, integer hour, integer minute, integer second) |
| | Constructs a UTCTime object with all date and time components.
|
| |
| | UTCTime (const point &p) |
| | Constructs a UTCTime object from a time point.
|
| |
|
| UTCTime (const UTCTime &other)=default |
| | Default copy constructor.
|
| |
|
UTCTime & | operator= (const UTCTime &other)=default |
| | Default copy assignment.
|
| |
| | UTCTime (UTCTime &&other) noexcept |
| | Move constructor.
|
| |
| UTCTime & | operator= (UTCTime &&other) noexcept |
| | Move assignment.
|
| |
| UTCTime | date () const |
| | Returns a new UTCTime object containing only the calendar date.
|
| |
| integer | value (unit unit) const |
| | Gets time component value.
|
| |
| integer | value (calendar calendar) const |
| | Gets calendar component value.
|
| |
| | operator point () const |
| | Converts to time::point.
|
| |
|
point | toPoint () const |
| |
| integer | compareTo (const UTCTime &other) const override |
| | Compares this UTCTime to another.
|
| |
| u_integer | toHash () const noexcept override |
| | Computes hash value for this UTCTime.
|
| |
| std::string | className () const override |
| | Gets the class name.
|
| |
| std::string | toString (bool enter) const override |
| | Converts UTCTime to string representation (YYYY-MM-DD HH:MM:SS)
|
| |
| virtual integer | compareTo (const UTCTime &other) const=0 |
| | Compares the current object with another of the same type.
|
| |
| bool | operator== (const UTCTime &other) const |
| | Checks if the current object is equal to another.
|
| |
| bool | operator!= (const UTCTime &other) const |
| | Checks if the current object is not equal to another.
|
| |
| bool | operator< (const UTCTime &other) const |
| | Checks if the current object is less than another.
|
| |
| bool | operator> (const UTCTime &other) const |
| | Checks if the current object is greater than another.
|
| |
| bool | operator<= (const UTCTime &other) const |
| | Checks if the current object is less than or equal to another.
|
| |
| bool | operator>= (const UTCTime &other) const |
| | Checks if the current object is greater than or equal to another.
|
| |
|
virtual | ~comparable ()=default |
| | Virtual destructor for proper cleanup of derived objects.
|
| |
| virtual bool | equals (const UTCTime &other) const noexcept |
| | Compares two objects for equality.
|
| |
| virtual | ~hashable ()=0 |
| | Virtual destructor.
|
| |
| | operator std::string () const |
| | Explicit conversion to std::string.
|
| |
| | operator const char * () const |
| | Explicit conversion to C-style string.
|
| |
| const char * | toCString (bool enter) const |
| | Direct C-string access with formatting control.
|
| |
|
template<typename TYPE > |
| auto | formatString (const TYPE &t) -> std::string |
| |
|
template<typename TYPE > |
| auto | formatCString (const TYPE &t) -> const char * |
| |
|
template<typename TYPE > |
| auto | formatEnum (const TYPE &t) -> std::string |
| |
|
template<typename TYPE > |
| auto | formatString (TYPE *const &ptr) -> std::string |
| |
|
| static UTCTime | now () |
| | Gets current UTC time.
|
| |
| static integer | localZonedOffset () |
| | Returns the system's local timezone offset in hours from UTC.
|
| |
| static UTCTime | localNow () |
| | Returns the current local time as UTCTime.
|
| |
| static constexpr bool | isLeapYear (integer year) |
| | Checks if year is a leap year.
|
| |
| static constexpr integer | daysOfMonth (integer year, integer month) |
| | Gets days in specified month.
|
| |
| static constexpr weekdays | weekday (integer year, integer month, integer day) |
| | Calculates weekday for given date.
|
| |
| static constexpr bool | isValidYMD (integer year, integer month, integer day) |
| | Checks if year-month-day is valid.
|
| |
| static constexpr bool | isValidHMS (integer hour, integer minute, integer second) |
| | Checks if hour-minute-second is valid.
|
| |
| static constexpr bool | isValid (integer year, integer month, integer day, integer hour, integer minute, integer second) |
| | Checks if full date-time is valid.
|
| |
| template<typename TYPE > |
| static std::string | formatString (const TYPE &t) |
| | Universal value-to-string conversion.
|
| |
| template<Printable TYPE> |
| static std::string | formatString (const TYPE &t) |
| | Specialization for printable types.
|
| |
| template<EnumType TYPE> |
| static std::string | formatString (const TYPE &t) |
| | Specialization for enum types.
|
| |
| template<typename TYPE > |
| static std::string | formatString (TYPE *const &ptr) |
| | Pointer-specific formatting.
|
| |
| template<typename TYPE > |
| static const char * | formatCString (const TYPE &t) |
| | C-string cache for temporary usage.
|
| |
| template<typename TYPE > |
| static std::string | formatEnum (const TYPE &t) |
| | Enum formatting utility.
|
| |
|
template<> |
| auto | formatString (const char &t) -> std::string |
| |
|
template<> |
| auto | formatString (const bool &t) -> std::string |
| |
|
template<> |
| auto | formatString (const char *const &ptr) -> std::string |
| |
Represents a UTC calendar date and time.
Provides calendar operations including:
- Leap year detection
- Days in month calculation
- Weekday calculation
- Conversion to/from time points