C# OJAI Client API
|
Public Member Functions | |
OjaiTime (long epoh) | |
Constructor of OjaiTime instance from the milliseconds value since the Unix epoch.The TIME value is set to the corresponding time in the default time zone. More... | |
OjaiTime (int hourOfDay, int minutes, int seconds) | |
Constructor of OjaiTime instance set to the specified hour, minute and seconds. More... | |
OjaiTime (int hourOfDay, int minutes, int seconds, int ms) | |
Constructor of OjaiTime instance set to the specified hour, minute and seconds and milliseconds. More... | |
OjaiTime (DateTime dateTime) | |
Constructor of OjaiTime instance from the specified DateTime. More... | |
DateTime | ToDateTime () |
Returns this OJAI date as DateTime instance. More... | |
int | TimeInMillis () |
The total number of milliseconds since the midnight for this TIME in UTC. More... | |
String | ToShortTimeString () |
A string representation of this TIME in "HH:mm" format. More... | |
String | ToFullTimeString () |
Returns a string representation of this TIME in "HH:mm.ss.SSS" format. More... | |
String | ToTimeString () |
Returns a string representation of this TIME in "HH:mm.ss[.SSS]" format. The milliseconds are omitted if zero. More... | |
String | ToString (String pattern) |
Returns a string representation of this TIME using the specified format pattern. More... | |
override String | ToString () |
override int | GetHashCode () |
override bool | Equals (Object obj) |
Static Public Member Functions | |
static OjaiTime | Parse (String timeStr) |
Parses and returns an instance of OjaiTime from the specified string. More... | |
static OjaiTime | FromMillisOfDay (int millisOfDay) |
Return an OjaiTime instance from the specified milliseconds since midnight. More... | |
Public Attributes | |
int | Hour => _dateTime.Hour |
The hour part of this OJAI date. More... | |
int | Minute => _dateTime.Minute |
The minute part of this OJAI date. More... | |
int | Second => _dateTime.Second |
The second part of this OJAI date. More... | |
int | Millisecond => _dateTime.Millisecond |
The millisecond part of this OJAI date. More... | |
Private Member Functions | |
OjaiTime (int millisOfDay) | |
Private constructor of OjaiTime instance from the specified milliseconds since midnight. More... | |
Private Attributes | |
DateTime | _dateTime |
int | _millisOfDay |
Static Private Attributes | |
static DateTime | EPOCH_DATE = new DateTime(1970, 1, 1, 0, 0, 0, 0) |
MapRDB.Driver.Ojai.OjaiTime.OjaiTime | ( | long | epoh | ) |
Constructor of OjaiTime instance from the milliseconds value since the Unix epoch.The TIME value is set to the corresponding time in the default time zone.
epoh | the milliseconds from 1970-01-01T00:00:00.000 UTC |
MapRDB.Driver.Ojai.OjaiTime.OjaiTime | ( | int | hourOfDay, |
int | minutes, | ||
int | seconds | ||
) |
Constructor of OjaiTime instance set to the specified hour, minute and seconds.
hourOfDay | the hour of the day, from 0 to 23 |
minutes | the minute of the hour, from 0 to 59 |
seconds | the second of the minute, from 0 to 59 |
MapRDB.Driver.Ojai.OjaiTime.OjaiTime | ( | int | hourOfDay, |
int | minutes, | ||
int | seconds, | ||
int | ms | ||
) |
Constructor of OjaiTime instance set to the specified hour, minute and seconds and milliseconds.
hourOfDay | the hour of the day, from 0 to 23 |
minutes | the minute of the hour, from 0 to 59 |
seconds | the second of the minute, from 0 to 59 |
ms | the millisecond of the second, from 0 to 999 |
MapRDB.Driver.Ojai.OjaiTime.OjaiTime | ( | DateTime | dateTime | ) |
Constructor of OjaiTime instance from the specified DateTime.
dateTime |
|
private |
Private constructor of OjaiTime instance from the specified milliseconds since midnight.
millisOfDay |
|
static |
Return an OjaiTime instance from the specified milliseconds since midnight.
millisOfDay | the number of milliseconds since midnight |
|
static |
Parses and returns an instance of OjaiTime from the specified string.
timeStr |
int MapRDB.Driver.Ojai.OjaiTime.TimeInMillis | ( | ) |
The total number of milliseconds since the midnight for this TIME in UTC.
DateTime MapRDB.Driver.Ojai.OjaiTime.ToDateTime | ( | ) |
Returns this OJAI date as DateTime instance.
String MapRDB.Driver.Ojai.OjaiTime.ToFullTimeString | ( | ) |
Returns a string representation of this TIME in "HH:mm.ss.SSS" format.
String MapRDB.Driver.Ojai.OjaiTime.ToShortTimeString | ( | ) |
A string representation of this TIME in "HH:mm" format.
String MapRDB.Driver.Ojai.OjaiTime.ToString | ( | String | pattern | ) |
Returns a string representation of this TIME using the specified format pattern.
pattern |
String MapRDB.Driver.Ojai.OjaiTime.ToTimeString | ( | ) |
Returns a string representation of this TIME in "HH:mm.ss[.SSS]" format. The milliseconds are omitted if zero.
int MapRDB.Driver.Ojai.OjaiTime.Hour => _dateTime.Hour |
The hour part of this OJAI date.
int MapRDB.Driver.Ojai.OjaiTime.Millisecond => _dateTime.Millisecond |
The millisecond part of this OJAI date.
int MapRDB.Driver.Ojai.OjaiTime.Minute => _dateTime.Minute |
The minute part of this OJAI date.
int MapRDB.Driver.Ojai.OjaiTime.Second => _dateTime.Second |
The second part of this OJAI date.