Aller au contenu principal

DateTime():year()

Sets the year of the DateTime object.

Signature

year(year: number): DateTime

Parameters

ParametersTypeDescription
yearnumberThe year to set.

Returns

DateTime - The current DateTime instance for chaining.