DateOnly
Tip
This is a builtin dotnet type. The documentation and api interface are generated from dotnet source files.
Represents dates with values ranging from January 1, 0001 Anno Domini (Common Era) through December 31, 9999 A.D. (C.E.) in the Gregorian calendar.
Fields:
Day number
Gets the day component of the date represented by this instance.
DayNumber number
Gets the number of days since January 1, 0001 in the Proleptic Gregorian calendar represented by this instance.
DayOfYear number
Gets the day of the year represented by this instance.
Month number
Gets the month component of the date represented by this instance.
Year number
Gets the year component of the date represented by this instance.
Constructors:
New(year: number, month: number, day: number) :
Creates a new instance of the DateOnly structure to the specified year, month, and day.
Name | Type | Default | Summary |
year | number | The year (1 through 9999). | |
month | number | The month (1 through 12). | |
day | number | The day (1 through the number of days in month). |
Methods:
CompareTo(value?: Object) : number
Compares the value of this instance to a specified object that contains a specified DateOnly value, and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified DateOnly value.
Name | Type | Default | Summary |
value | Object | A boxed object to compare, or |
CompareTo(value: DateOnly) : number
Compares the value of this instance to a specified DateOnly value and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified DateOnly value.
Name | Type | Default | Summary |
value | DateOnly | The object to compare to the current instance. |