proposit-core
    Preparing search index...

    Function calendarDateFromInstant

    • The calendar date of an instant, read in timeZone and cut to precision.

      value is a Date, or the ISO string a Date is written as by JSON.stringify, which names its zone. With the default zone, "UTC", it gives the day a citation date stored as midnight UTC of that day means. Pass the zone the value was written in to recover a day stored at local midnight.

      A string that is already a calendar date comes back as it is, cut to precision only when it is longer, so converting a partly converted store twice changes nothing and never invents a month or day.

      Parameters

      Returns string

      TypeError when value is neither a valid instant nor a calendar date, including a date-time string that names no zone or names a day or time that does not exist.

      RangeError when the year falls outside 0000-9999, or timeZone is not a time zone Intl.DateTimeFormat knows.