oa::Datetime

— human-readable UTC date/time over the system clock. For logs, debugging, display. NEVER for consensus or deterministic math.

Public Methods

Datetime oa::Datetime::add(oa::Duration inDuration)
oa::I32 oa::Datetime::day()
oa::I32 oa::Datetime::dayOfWeek()
oa::I32 oa::Datetime::dayOfYear()
oa::Duration oa::Datetime::diff(const Datetime & inOther)
oa::String oa::Datetime::format(const char * inFmt = "%Y-%m-%dT%H:%M:%SZ")
oa::SystemTimePoint oa::Datetime::getTimePoint()
oa::I32 oa::Datetime::hour()
bool oa::Datetime::isValid()
oa::I32 oa::Datetime::microsecond()
oa::I32 oa::Datetime::minute()
oa::I32 oa::Datetime::month()
bool oa::Datetime::operator!=(const Datetime & inOther)
bool oa::Datetime::operator<(const Datetime & inOther)
bool oa::Datetime::operator<=(const Datetime & inOther)
bool oa::Datetime::operator==(const Datetime & inOther)
bool oa::Datetime::operator>(const Datetime & inOther)
bool oa::Datetime::operator>=(const Datetime & inOther)
oa::I32 oa::Datetime::second()
Datetime oa::Datetime::subtract(oa::Duration inDuration)
oa::String oa::Datetime::toDate()
oa::String oa::Datetime::toIso()
oa::String oa::Datetime::toIsoMicro()
oa::F64 oa::Datetime::toSeconds()
oa::String oa::Datetime::toTime()
oa::I64 oa::Datetime::unixNanoseconds()
oa::I64 oa::Datetime::unixSeconds()
oa::I32 oa::Datetime::year()

Static Public Methods

static Datetime oa::Datetime::fromDouble(oa::F64 inSeconds)
static Datetime oa::Datetime::fromUnixNanoseconds(oa::I64 inNanoseconds)
static Datetime oa::Datetime::fromUnixSeconds(oa::I64 inSeconds)
static Datetime oa::Datetime::now()

Constructor & Destructor Documentation

oa::Datetime::Datetime()
No public source comment is attached to this declaration.
oa::Datetime::Datetime( oa::I32 inYear, oa::I32 inMonth, oa::I32 inDay, oa::I32 inHour = 0, oa::I32 inMinute = 0, oa::I32 inSecond = 0 )
No public source comment is attached to this declaration.

Parameters

inYear
oa::I32

inMonth
oa::I32

inDay
oa::I32

inHour
oa::I32

Default: 0

inMinute
oa::I32

Default: 0

inSecond
oa::I32

Default: 0

oa::Datetime::Datetime( oa::SystemTimePoint inTime )
No public source comment is attached to this declaration.

Parameters

inTime
oa::SystemTimePoint

Public Method Documentation

Datetime oa::Datetime::add( oa::Duration inDuration )
No public source comment is attached to this declaration.

Parameters

inDuration
oa::Duration

Returns

Datetime

The declared return value.

oa::I32 oa::Datetime::day()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

oa::I32 oa::Datetime::dayOfWeek()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

oa::I32 oa::Datetime::dayOfYear()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

oa::Duration oa::Datetime::diff( const Datetime & inOther )
No public source comment is attached to this declaration.

Parameters

inOther
const Datetime &

Returns

oa::Duration

The declared return value.

oa::String oa::Datetime::format( const char * inFmt = "%Y-%m-%dT%H:%M:%SZ" )
No public source comment is attached to this declaration.

Parameters

inFmt
const char *

Default: "%Y-%m-%dT%H:%M:%SZ"

Returns

oa::String

The declared return value.

oa::SystemTimePoint oa::Datetime::getTimePoint()
No public source comment is attached to this declaration.

Returns

oa::SystemTimePoint

The declared return value.

oa::I32 oa::Datetime::hour()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

bool oa::Datetime::isValid()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

oa::I32 oa::Datetime::microsecond()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

oa::I32 oa::Datetime::minute()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

oa::I32 oa::Datetime::month()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

bool oa::Datetime::operator!=( const Datetime & inOther )
No public source comment is attached to this declaration.

Parameters

inOther
const Datetime &

Returns

bool

The declared return value.

bool oa::Datetime::operator<( const Datetime & inOther )
No public source comment is attached to this declaration.

Parameters

inOther
const Datetime &

Returns

bool

The declared return value.

bool oa::Datetime::operator<=( const Datetime & inOther )
No public source comment is attached to this declaration.

Parameters

inOther
const Datetime &

Returns

bool

The declared return value.

bool oa::Datetime::operator==( const Datetime & inOther )
No public source comment is attached to this declaration.

Parameters

inOther
const Datetime &

Returns

bool

The declared return value.

bool oa::Datetime::operator>( const Datetime & inOther )
No public source comment is attached to this declaration.

Parameters

inOther
const Datetime &

Returns

bool

The declared return value.

bool oa::Datetime::operator>=( const Datetime & inOther )
No public source comment is attached to this declaration.

Parameters

inOther
const Datetime &

Returns

bool

The declared return value.

oa::I32 oa::Datetime::second()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

Datetime oa::Datetime::subtract( oa::Duration inDuration )
No public source comment is attached to this declaration.

Parameters

inDuration
oa::Duration

Returns

Datetime

The declared return value.

oa::String oa::Datetime::toDate()
No public source comment is attached to this declaration.

Returns

oa::String

The declared return value.

oa::String oa::Datetime::toIso()
No public source comment is attached to this declaration.

Returns

oa::String

The declared return value.

oa::String oa::Datetime::toIsoMicro()
No public source comment is attached to this declaration.

Returns

oa::String

The declared return value.

oa::F64 oa::Datetime::toSeconds()
No public source comment is attached to this declaration.

Returns

oa::F64

The declared return value.

oa::String oa::Datetime::toTime()
No public source comment is attached to this declaration.

Returns

oa::String

The declared return value.

oa::I64 oa::Datetime::unixNanoseconds()
No public source comment is attached to this declaration.

Returns

oa::I64

The declared return value.

oa::I64 oa::Datetime::unixSeconds()
No public source comment is attached to this declaration.

Returns

oa::I64

The declared return value.

oa::I32 oa::Datetime::year()
No public source comment is attached to this declaration.

Returns

oa::I32

The declared return value.

static Datetime oa::Datetime::fromDouble( oa::F64 inSeconds )
No public source comment is attached to this declaration.

Parameters

inSeconds
oa::F64

Returns

Datetime

The declared return value.

static Datetime oa::Datetime::fromUnixNanoseconds( oa::I64 inNanoseconds )
No public source comment is attached to this declaration.

Parameters

inNanoseconds
oa::I64

Returns

Datetime

The declared return value.

static Datetime oa::Datetime::fromUnixSeconds( oa::I64 inSeconds )
No public source comment is attached to this declaration.

Parameters

inSeconds
oa::I64

Returns

Datetime

The declared return value.

static Datetime oa::Datetime::now()
No public source comment is attached to this declaration.

Returns

Datetime

The declared return value.