Optional
month: numberIf provided, must be between 1 (January) and 12 (December) inclusive.
Optional
day: numberIf provided, must be between 1 and the number of days in the corresponding month (thus 31 at most).
Construct a DateValue object from a standard JavaScript Date object.
With this constructor, the type of the returned object is always 'ymd'
(see DateValue.type).
Day in month, valued between 1 and the number of days in the corresponding month (thus 31 at most).
exception.IllegalArgument if the current type is 'y'
or 'ym'
(see DateValue.type).
Month index, valued between 1 (January) and 12 (December) inclusive.
exception.IllegalArgument if the current type is 'y'
(see DateValue.type).
Convert the current object into a standard JavaScript Date object.
If the type of the current object is 'ym'
, the returned Date
object points at the first day of the corresponding month.
If the type of the current object is 'y'
, the returned Date
object points at the first day of the corresponding year.
Get the date of the game as a human-readable string (e.g. 'November 1955'
, 'September 4, 2021'
).
Optional
locales: string | string[]Locales to use to generate the result. If undefined, the default locale of the execution environment is used. See Intl documentation for more details.
Static
fromPGNStringStatic
fromStatic
is
Date of a chess game. It can be either partially defined (with the year only, or with the year and month but without day of month), or fully defined (with year, month and day of month).
See
Game.date