Get the year as number (four digits)
FYear.now().value; // => 1999
Returns true if this year is after given year.
If the years are the same this function returns false.
The year to compare with.
true
if this year is after given year.
Returns true if this year is before given year.
If the years are the same this function returns false.
The year to compare with.
true
if this year is before given year.
This returns a boolean
indicating whether the FYear object contains a
valid year or not.
FYear().isValid(); // => boolean
Serializes to a JSON value.
Returns a string representation of the year.
Static
compareCompares two FYear objects. Returns and integer indicating
whenever a
comes before or after or is equal to b
.
-1
if a
beomes before b
.0
if a
and b
are the same year.1
if a
beomes after b
.If either or both years is invalid the result is undefined behaviour and
should not be relied on. Use FYear.isValid to ensure validity
first, e.g. myArray.filter(it => it.isValid())
before sorting.
-1
, 0
or 1
Static
fromStatic
fromStatic
now
Represents a year.
Since
v6.12.0