Liking cljdoc? Tell your friends :D

ty.i18n.time

Date and time formatting using native Intl.DateTimeFormat. Extends the Translator protocol for JS Date objects.

Date and time formatting using native Intl.DateTimeFormat.
Extends the Translator protocol for JS Date objects.
raw docstring

format-datecljs

(format-date date)
(format-date date locale)
(format-date date locale options)

Format a date using Intl.DateTimeFormat. Options can include:

  • :dateStyle - 'full', 'long', 'medium', 'short'
  • :timeStyle - 'full', 'long', 'medium', 'short'
  • :year, :month, :day - 'numeric', '2-digit', etc
  • :hour, :minute, :second - 'numeric', '2-digit'
  • :weekday - 'long', 'short', 'narrow'
  • :timeZone - timezone string
Format a date using Intl.DateTimeFormat.
Options can include:
- :dateStyle - 'full', 'long', 'medium', 'short'
- :timeStyle - 'full', 'long', 'medium', 'short'
- :year, :month, :day - 'numeric', '2-digit', etc
- :hour, :minute, :second - 'numeric', '2-digit'
- :weekday - 'long', 'short', 'narrow'
- :timeZone - timezone string
sourceraw docstring

format-date-fullcljs

(format-date-full date)
(format-date-full date locale)

Format date in full format (e.g., Sunday, December 31, 2023)

Format date in full format (e.g., Sunday, December 31, 2023)
sourceraw docstring

format-date-longcljs

(format-date-long date)
(format-date-long date locale)

Format date in long format (e.g., December 31, 2023)

Format date in long format (e.g., December 31, 2023)
sourceraw docstring

format-date-mediumcljs

(format-date-medium date)
(format-date-medium date locale)

Format date in medium format (e.g., Dec 31, 2023)

Format date in medium format (e.g., Dec 31, 2023)
sourceraw docstring

format-date-shortcljs

(format-date-short date)
(format-date-short date locale)

Format date in short format (e.g., 12/31/2023)

Format date in short format (e.g., 12/31/2023)
sourceraw docstring

format-datetimecljs

(format-datetime date)
(format-datetime date locale)

Format both date and time

Format both date and time
sourceraw docstring

format-relativecljs

(format-relative value unit)
(format-relative value unit locale)

Format relative time using Intl.RelativeTimeFormat. Unit can be: 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second'

Format relative time using Intl.RelativeTimeFormat.
Unit can be: 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second'
sourceraw docstring

format-timecljs

(format-time date)
(format-time date locale)

Format time only

Format time only
sourceraw docstring

get-month-namescljs

(get-month-names locale)
(get-month-names locale style)

Get localized month names

Get localized month names
sourceraw docstring

get-weekday-namescljs

(get-weekday-names locale)
(get-weekday-names locale style)

Get localized weekday names

Get localized weekday names
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close