C# OJAI Client API
|
Public Member Functions | |
OjaiDate (int year, int month, int dayOfMonth) | |
Constructor of OjaiDate instance from the specified year, month and day of the month More... | |
OjaiDate (long epoh) | |
Constructor of OjaiDate instance from the milliseconds value since the Unix epoch. The DATE value is set to the calendar date in the default time zone. More... | |
OjaiDate (DateTime dateTime) | |
Constructor of OjaiDate instance from the specified DateTime. More... | |
DateTime | ToDateTime () |
Return this OJAI date as DateTime instance. More... | |
String | ToDateString () |
Returns a string representation of this OJAI date in ISO8601 format (yyyy-MM-dd). More... | |
String | ToString (String pattern) |
Returns a string representation of this OJAI date using the specified format pattern. More... | |
override String | ToString () |
override int | GetHashCode () |
override bool | Equals (Object obj) |
Static Public Member Functions | |
static OjaiDate | Parse (String dateStr) |
Parse and return an instance of OjaiDate from the specified string. More... | |
static OjaiDate | FromDaysSinceEpoch (int daysSinceEpoch) |
Return an OajiDate instance from the specified number of days since epoch. More... | |
Public Attributes | |
int | Year => _dateTime.Year |
Number of years of OJAI Date. More... | |
int | Month => _dateTime.Month |
Number of months of OJAI Date. More... | |
int | Day => _dateTime.Day |
Number of days of month of OJAI Date. More... | |
int | DaysSinceEpoch => _daysSinceEpoch |
The total number of days since the Unix epoch. More... | |
Private Member Functions | |
OjaiDate (int daysSinceEpoch) | |
Private constructor of OjaiDate instance from the specified number of days since epoch. More... | |
Private Attributes | |
DateTime | _dateTime |
int | _daysSinceEpoch |
Static Private Attributes | |
static DateTime | EPOCH_DATE = new DateTime(1970, 1, 1) |
MapRDB.Driver.Ojai.OjaiDate.OjaiDate | ( | int | year, |
int | month, | ||
int | dayOfMonth | ||
) |
Constructor of OjaiDate instance from the specified year, month and day of the month
year | the year |
month | the month of the year, from 1 to 12 |
dayOfMonth | the day of the month, from 1 to 31 |
MapRDB.Driver.Ojai.OjaiDate.OjaiDate | ( | long | epoh | ) |
Constructor of OjaiDate instance from the milliseconds value since the Unix epoch. The DATE value is set to the calendar date in the default time zone.
epoh | the milliseconds from 1970-01-01T00:00:00.000 UTC |
MapRDB.Driver.Ojai.OjaiDate.OjaiDate | ( | DateTime | dateTime | ) |
Constructor of OjaiDate instance from the specified DateTime.
dateTime |
|
private |
Private constructor of OjaiDate instance from the specified number of days since epoch.
daysSinceEpoch |
|
static |
Return an OajiDate instance from the specified number of days since epoch.
daysSinceEpoch | the number of days since epoch |
|
static |
String MapRDB.Driver.Ojai.OjaiDate.ToDateString | ( | ) |
Returns a string representation of this OJAI date in ISO8601 format (yyyy-MM-dd).
DateTime MapRDB.Driver.Ojai.OjaiDate.ToDateTime | ( | ) |
Return this OJAI date as DateTime instance.
String MapRDB.Driver.Ojai.OjaiDate.ToString | ( | String | pattern | ) |
Returns a string representation of this OJAI date using the specified format pattern.
pattern |
int MapRDB.Driver.Ojai.OjaiDate.Day => _dateTime.Day |
Number of days of month of OJAI Date.
int MapRDB.Driver.Ojai.OjaiDate.DaysSinceEpoch => _daysSinceEpoch |
The total number of days since the Unix epoch.
int MapRDB.Driver.Ojai.OjaiDate.Month => _dateTime.Month |
Number of months of OJAI Date.
int MapRDB.Driver.Ojai.OjaiDate.Year => _dateTime.Year |
Number of years of OJAI Date.