242 picoseconds_(subseconds)
250 return totalSeconds_;
#define ONIXS_FIXENGINE_API
The time span related functionality.
Microsecond microsecond() const
The current microsecond.
static Timestamp parse(const std::string &, TimestampFormat::Enum=TimestampFormat::YYYYMMDDHHMMSSNsec)
Parses the timestamp from its text presentation assuming it's in the specified format ("YYYYMMDD-HH:M...
static Timestamp local()
Returns the current local time.
Year year() const
The current year.
Timestamp(Year year, Month::Enum month, Day day, Hour hour=0, Minute minute=0, Second second=0, Nanosecond nanosecond=0)
Initializes date-time from all details.
TotalNanoseconds toUnixNanosecondTimestamp() const
Returns the nanosecond timestamp since the Unix epoch.
Day day() const
The current day of month.
Timestamp(Year year, Month::Enum month, Day day, Hour hour, Minute minute, Second second, Picosecond picosecond)
Initializes date-time from all details.
Timestamp()
Constructs an uninitialized instance.
Minute minute() const
The current minute.
Hour hour() const
The current hour.
void date(YearMonthDay &) const
Returns the date part of the timestamp.
void toString(std::string &str, TimestampFormat::Enum=TimestampFormat::YYYYMMDDHHMMSSNsec) const
Appends the timestamp text presentation in the requested format ("YYYYMMDD-HH:MM:SS....
Nanosecond nanosecond() const
The current nanosecond.
Second second() const
The current second.
std::string toString(TimestampFormat::Enum=TimestampFormat::YYYYMMDDHHMMSSNsec) const
Returns the timestamp text presentation in the requested format ("YYYYMMDD-HH:MM:SS....
TotalSeconds totalSeconds() const
The total number of seconds since Jan 1, 0001, 00:00:00.
Timestamp(TotalNanoseconds unixTimestampNanoseconds)
Initializes from nanoseconds since Jan 1, 1970, 00:00:00 (Unix epoch).
Millisecond millisecond() const
The current millisecond.
Month::Enum month() const
The current month.
static Timestamp utc()
Returns the current UTC time.
Picosecond picosecond() const
The current picosecond.
HugeInterval TotalNanoseconds
HugeInterval TotalSeconds
Defines all the months in the year.
static const Picoseconds PicosecondsPerMicrosecond
static const Picoseconds PicosecondsPerNanosecond
static const Picoseconds PicosecondsPerMillisecond