WebSharper.DayJs

Day.js bindings for F# — with WebSharper

Source

${notice}

Parse & format

Dayjs(...) parses a date from a string, a format string, a Unix timestamp or another Dayjs value; Format(...) turns it back into text.

${parseReport}

Manipulate

Day.js objects are immutable: Add, Subtract, StartOf, EndOf, Set and the plural getters from the pluralGetSet plugin all return a new object.

${manipulateReport}

Query

Comparisons with a unit granularity, plus the isBetween, isSameOrAfter, isSameOrBefore, isToday, isTomorrow and isYesterday plugins.

${queryReport}

Difference & relative time

Diff returns the difference in a unit (or in milliseconds), and the relativeTime plugin adds FromNow, ToNow, From and To.

${diffReport}

UTC & timezones

The utc and timezone plugins add Utc, Local, IsUTC, UtcOffset, Tz, TzStatic, TzGuess and OffsetName. Timezones come from the browser's Intl data.

${zoneReport}

Locales

Locale, the localeData plugin (Weekdays, Months, LocaleData), the Ls registry and the updateLocale plugin.

${localeReport}

Durations

The duration plugin: Dayjs.Duration(...), Humanize, AsMinutes, Format, ToISOString and Add/Subtract.

${durationReport}

Objects, arrays & min/max

The objectSupport, arraySupport, toObject, toArray and minMax plugins.

${objectReport}

Type checks, calendar & installed plugins

IsDayjs, IsMoment, IsDuration, the calendar plugin and the list of plugins the sample installs with Extend.

${pluginReport}