The day of the month, 1 through 31.
The month, 1 through 12.
The year.
Static Readonly[typeDetermines whether this is the same calendar date as another.
The other date.
True when they are the same date.
Gets the ISO-8601 representation, yyyy-MM-dd - the same form the server sent.
The string.
StaticfromStaticfromStaticparse
Represents a date with no time and no time zone - a day on a calendar.
Remarks
Deliberately not a JavaScript
Date. ADateis an instant, and a calendar date is not one: turning2026-05-12into aDateproduces UTC midnight, which every browser-local getter west of UTC reads back as the 11th. That is a wrong answer that looks right, and it is only wrong for users in some time zones - which is how it survives development in others.Holding the three parts the server sent means there is no instant to convert and nothing to shift. Where a
Dateis genuinely wanted - to feed a date picker, or to do arithmetic - toDate constructs one in the local time zone, and the choice is then visible at the call site making it.