UNPKG

@ribajs/luxon

Version:

Luxon (time library) module for Riba.js

17 lines (15 loc) 473 B
import { Formatter } from "@ribajs/core"; import { DateTime } from "luxon"; /** * Get the numbering system of a DateTime, such 'beng'. */ export const LuxonNumberingSystemFormatter: Formatter = { name: "lx-numbering-system", /** * @see https://moment.github.io/luxon/docs/class/src/datetime.js~DateTime.html#instance-get-numberingSystem * @param target can be a Luxon DateTime object */ read(target: DateTime) { return target.numberingSystem; }, };