Skip to content
This repository was archived by the owner on Feb 18, 2026. It is now read-only.

Latest commit

 

History

History
60 lines (35 loc) · 1.75 KB

File metadata and controls

60 lines (35 loc) · 1.75 KB

$time / %24time / toLocaleStringOptions

Interface: toLocaleStringOptions

$time.toLocaleStringOptions

It is in fact argument for options in Date.prototype.toLocaleString Parameters.

Table of contents

Properties

Properties

declension

Optional declension: boolean

Needed for some languages — for example in Czech: "10. července" (declension=true), or "10. červenec" (declension=false)

Defaults to true


locales

Optional locales: string

ISO language identificator such as "en-GB" (default value)


sunday_shift

Optional sunday_shift: number

This provide handy way to change the default indexing for

…primary for using in range [-1,infinity), for negative indices the final result is increases by 7

Defaults to 0

Examples:

  • sunday_shift=-1Mo=0,Tu=1,We=2,Th=3,Fr=4,Sa=5,Su=6
  • sunday_shift=0Mo=1,Tu=2,We=3,Th=4,Fr=5,Sa=6,Su=0
  • sunday_shift=3Mo=4,Tu=5,We=6,Th=7,Fr=8,Sa=9,Su=3
  • …also works: sunday_shift=-8 ⇒ `Mo=0,Tu=1,We=2,Th=3,Fr=4,Sa=5,Su=-1``

timeZone

Optional timeZone: ary_ianna_time_zones