Skip to main content
Module

x/ptera/locale.ts>Locale

Ptera is DateTime library for Deno
Latest
class Locale
import { Locale } from "https://deno.land/x/ptera@v1.0.2/locale.ts";

Constructors

new
Locale(locale: string, options?: { dtfOptions?: Intl.DateTimeFormatOptions; nfOptions?: Intl.NumberFormatOptions; rtfOptions?: Intl.RelativeTimeFormatOptions; })

Properties

readonly
dtfOptions: Intl.DateTimeFormatOptions
readonly
locale: string
readonly
nfOptions: Intl.NumberFormatOptions
readonly
rtfOptions: Intl.RelativeTimeFormatOptions

Methods

eras(format: "long" | "short" | "narrow")
meridiems(format?: "long" | "short" | "narrow")
monthList(format:
| "numeric"
| "2-digit"
| "long"
| "short"
| "narrow"
)
nfFormat(n: number, options?: Intl.NumberFormatOptions)
nfFormatToParts(n: number, options?: Intl.NumberFormatOptions)
offsetName(
date: Date,
offsetFormat: "long" | "short",
timezone?: Timezone,
)
rtfFormat(
n: number,
unit: Intl.RelativeTimeFormatUnit,
options?: Intl.RelativeTimeFormatOptions,
)
rtfFormatToParts(
n: number,
unit: Intl.RelativeTimeFormatUnit,
options?: Intl.RelativeTimeFormatOptions,
)
weekList(format: "long" | "short" | "narrow")