C# OJAI Client API
|
Public Member Functions | |
OjaiTimestamp (long millisSinceEpoch) | |
Constructor of OjaiTimestamp instance from the milliseconds value since the Unix epoch. More... | |
OjaiTimestamp (int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) | |
Constructor of OjaiTimestamp instance set to the specified fields in the default time zone. More... | |
OjaiTimestamp (DateTime dateTime) | |
Constructor of OjaiTimestamp instance from a DateTime. More... | |
long | GetMillisSinceEpoch () |
The total number of milliseconds since the Unix epoch. More... | |
DateTime | ToDateTime () |
Returns this OJAI timestamp as DateTime instance. More... | |
String | ToUTCString () |
Returns the ISO8601 format timestamp string in UTC. More... | |
String | ToLocalString () |
Returns the ISO8601 format timestamp string in local time zone. More... | |
String | ToString (String pattern) |
Returns the string representation the timestamp using the specified format pattern. More... | |
override String | ToString () |
override int | GetHashCode () |
override bool | Equals (Object obj) |
Static Public Member Functions | |
static OjaiTimestamp | Parse (String dateTimeStr) |
Parses and returns an instance of OjaiTimestamp from the specified string. More... | |
Public Attributes | |
int | Year => _dateTime.Year |
Number of years of OJAI timestamp. More... | |
int | Month => _dateTime.Month |
Number of months of OJAI timestamp. More... | |
int | Day => _dateTime.Day |
Number of days of OJAI timestamp. More... | |
int | Hour => _dateTime.Hour |
Number of hours of OJAI timestamp. More... | |
int | Minute => _dateTime.Minute |
Number of minutes of OJAI timestamp. More... | |
int | Second => _dateTime.Second |
Number of seconds of OJAI timestamp. More... | |
int | Millisecond => _dateTime.Millisecond |
Number of milliseconds of OJAI timestamp. More... | |
Private Attributes | |
DateTime | _dateTime |
long | _millisSinceEpoch |
Static Private Attributes | |
static DateTime | EPOCH_DATE = new DateTime(1970, 1, 1, 0, 0, 0, 0) |
MapRDB.Driver.Ojai.OjaiTimestamp.OjaiTimestamp | ( | long | millisSinceEpoch | ) |
Constructor of OjaiTimestamp instance from the milliseconds value since the Unix epoch.
millisSinceEpoch | the milliseconds from 1970-01-01T00:00:00.000 UTC |
MapRDB.Driver.Ojai.OjaiTimestamp.OjaiTimestamp | ( | int | year, |
int | monthOfYear, | ||
int | dayOfMonth, | ||
int | hourOfDay, | ||
int | minuteOfHour, | ||
int | secondOfMinute, | ||
int | millisOfSecond | ||
) |
Constructor of OjaiTimestamp instance set to the specified fields in the default time zone.
year | the year |
monthOfYear | the month of the year, from 1 to 12 |
dayOfMonth | the day of the month, from 1 to 31 |
hourOfDay | the hour of the day, from 0 to 23 |
minuteOfHour | the minute of the hour, from 0 to 59 |
secondOfMinute | the second of the minute, from 0 to 59 |
millisOfSecond | the millisecond of the second, from 0 to 999 |
MapRDB.Driver.Ojai.OjaiTimestamp.OjaiTimestamp | ( | DateTime | dateTime | ) |
Constructor of OjaiTimestamp instance from a DateTime.
dateTime |
long MapRDB.Driver.Ojai.OjaiTimestamp.GetMillisSinceEpoch | ( | ) |
The total number of milliseconds since the Unix epoch.
|
static |
Parses and returns an instance of OjaiTimestamp from the specified string.
dateTimeStr |
DateTime MapRDB.Driver.Ojai.OjaiTimestamp.ToDateTime | ( | ) |
Returns this OJAI timestamp as DateTime instance.
String MapRDB.Driver.Ojai.OjaiTimestamp.ToLocalString | ( | ) |
Returns the ISO8601 format timestamp string in local time zone.
String MapRDB.Driver.Ojai.OjaiTimestamp.ToString | ( | String | pattern | ) |
Returns the string representation the timestamp using the specified format pattern.
pattern | the pattern specification |
String MapRDB.Driver.Ojai.OjaiTimestamp.ToUTCString | ( | ) |
Returns the ISO8601 format timestamp string in UTC.
int MapRDB.Driver.Ojai.OjaiTimestamp.Day => _dateTime.Day |
Number of days of OJAI timestamp.
int MapRDB.Driver.Ojai.OjaiTimestamp.Hour => _dateTime.Hour |
Number of hours of OJAI timestamp.
int MapRDB.Driver.Ojai.OjaiTimestamp.Millisecond => _dateTime.Millisecond |
Number of milliseconds of OJAI timestamp.
int MapRDB.Driver.Ojai.OjaiTimestamp.Minute => _dateTime.Minute |
Number of minutes of OJAI timestamp.
int MapRDB.Driver.Ojai.OjaiTimestamp.Month => _dateTime.Month |
Number of months of OJAI timestamp.
int MapRDB.Driver.Ojai.OjaiTimestamp.Second => _dateTime.Second |
Number of seconds of OJAI timestamp.
int MapRDB.Driver.Ojai.OjaiTimestamp.Year => _dateTime.Year |
Number of years of OJAI timestamp.