UNPKG

@ribajs/luxon

Version:

Luxon (time library) module for Riba.js

18 lines (16 loc) 497 B
import { Formatter } from "@ribajs/core"; import { Interval } from "luxon"; /** * Returns a string representation of this Interval appropriate for debugging. */ export const LuxonIntervalToStringFormatter: Formatter = { name: "lx-interval-to-string", /** * @see https://moment.github.io/luxon/docs/class/src/datetime.js~DateTime.html#instance-method-toString * @param target Interval * @returns string */ read(target: Interval): string { return target.toString(); }, };