Sese Framework
x.y.z
A cross-platform framework
|
日期时间类 更多...
#include <DateTime.h>
Public 类型 | |
enum class | Policy { ONLY_CREATE , FORMAT } |
日期创建策略 更多... | |
using | Ptr = std::unique_ptr<DateTime> |
Public 成员函数 | |
DateTime () noexcept=default | |
DateTime (uint64_t timestamp, int32_t utc=TIME_DEFAULT_ZONE, Policy policy=Policy::FORMAT) noexcept | |
bool | isLeapYear () const noexcept |
int32_t | getYears () const noexcept |
int32_t | getMonths () const noexcept |
int32_t | getDays () const noexcept |
int32_t | getHours () const noexcept |
int32_t | getMinutes () const noexcept |
int32_t | getSeconds () const noexcept |
int32_t | getMilliseconds () const noexcept |
int32_t | getMicroseconds () const noexcept |
int32_t | getUTC () const noexcept |
int32_t | getDayOfWeek () const noexcept |
int32_t | getDayOfYear () const noexcept |
uint64_t | getTimestamp () const noexcept |
TimeSpan | operator- (const DateTime &date_time) const noexcept |
DateTime | operator- (const TimeSpan &time_span) const noexcept |
DateTime | operator+ (const TimeSpan &time_span) const noexcept |
int32_t | compareTo (const DateTime &date_time) const noexcept |
精细比较 | |
int32_t | unclearCompareTo (const DateTime &date_time) const noexcept |
粗略比较 | |
静态 Public 成员函数 | |
static DateTime | now (int32_t utc=TIME_DEFAULT_ZONE, Policy policy=Policy::FORMAT) noexcept |
static DateTime::Ptr | nowPtr (int32_t utc=TIME_DEFAULT_ZONE, Policy policy=Policy::FORMAT) noexcept |
Private 属性 | |
int32_t | years = 1970 |
int32_t | months = 1 |
int32_t | days = 1 |
int32_t | hours = 0 |
int32_t | minutes = 0 |
int32_t | seconds = 0 |
int32_t | dayofweek = 0 |
int32_t | dayofyear = 0 |
bool | isLeap = false |
int32_t | milliseconds = 0 |
int32_t | microseconds = 0 |
int32_t | utc = 0 |
uint64_t | timestamp = 0 |
日期时间类
using sese::DateTime::Ptr = std::unique_ptr<DateTime> |
|
strong |
|
explicitdefaultnoexcept |
|
explicitnoexcept |
|
nodiscardnoexcept |
精细比较
|
inlinenodiscardnoexcept |
引用了 dayofweek.
|
inlinenodiscardnoexcept |
引用了 dayofyear.
|
inlinenodiscardnoexcept |
引用了 days.
|
inlinenodiscardnoexcept |
引用了 hours.
|
inlinenodiscardnoexcept |
引用了 microseconds.
|
inlinenodiscardnoexcept |
引用了 milliseconds.
|
inlinenodiscardnoexcept |
引用了 minutes.
|
inlinenodiscardnoexcept |
引用了 months.
|
inlinenodiscardnoexcept |
引用了 seconds.
|
inlinenodiscardnoexcept |
引用了 timestamp.
被这些函数引用 operator+() , 以及 operator-().
|
inlinenodiscardnoexcept |
引用了 utc.
|
inlinenodiscardnoexcept |
引用了 years.
|
inlinenodiscardnoexcept |
引用了 isLeap.
|
staticnoexcept |
|
staticnoexcept |
引用了 getTimestamp().
引用了 getTimestamp().
|
nodiscardnoexcept |
粗略比较
|
private |
被这些函数引用 getDayOfWeek().
|
private |
被这些函数引用 getDayOfYear().
|
private |
被这些函数引用 getDays().
|
private |
被这些函数引用 getHours().
|
private |
被这些函数引用 isLeapYear().
|
private |
被这些函数引用 getMicroseconds().
|
private |
被这些函数引用 getMilliseconds().
|
private |
被这些函数引用 getMinutes().
|
private |
被这些函数引用 getMonths().
|
private |
被这些函数引用 getSeconds().
|
private |
被这些函数引用 getTimestamp().
|
private |
被这些函数引用 getUTC().
|
private |
被这些函数引用 getYears().