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.
(format-date date)(format-date date locale)(format-date date locale options)Format a date using Intl.DateTimeFormat. Options can include:
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-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)
(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)
(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)
(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)
(format-datetime date)(format-datetime date locale)Format both date and time
Format both date and time
(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'
(format-time date)(format-time date locale)Format time only
Format time only
(get-month-names locale)(get-month-names locale style)Get localized month names
Get localized month names
(get-weekday-names locale)(get-weekday-names locale style)Get localized weekday names
Get localized weekday names
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |