Documentation

Std.Time.Date.Unit.Year

Defines the different eras.

  • bce : Era

    The era before the Common Era (BCE), always represents a date before year 0.

  • ce : Era

    The Common Era (CE), represents dates from year 0 onwards.

Instances For
@[inline]

Creates an Offset from a natural number.

Equations
@[inline]

Creates an Offset from an integer.

Equations
@[inline]

Converts the Year offset to an Int.

Equations
  • offset.toInt = offset
@[inline]

Converts the Year offset to a Month offset.

Equations
@[inline]

Determines if a year is a leap year in the proleptic Gregorian calendar.

Equations
  • y.isLeap = decide (y.toInt.tmod 4 = 0 (y.toInt.tmod 100 0 y.toInt.tmod 400 = 0))

Returns the Era of the Year.

Equations

Calculates the number of days in the specified year.

Equations
  • One or more equations did not get rendered due to their size.

Calculates the number of weeks in the specified year.

Equations
  • One or more equations did not get rendered due to their size.
@[reducible, inline]

Checks if the given date is valid for the specified year, month, and day.

Equations