UNPKG

@ribajs/luxon

Version:

Luxon (time library) module for Riba.js

18 lines (16 loc) 486 B
import { Formatter } from "@ribajs/core"; import { Interval } from "luxon"; /** * Return whether this Interval has the same start and end DateTimes. */ export const LuxonIntervalIsEmptyFormatter: Formatter = { name: "lx-interval-is-empty", /** * @see https://moment.github.io/luxon/docs/class/src/datetime.js~DateTime.html#instance-method-isEmpty * @param target Interval * @returns boolean */ read(target: Interval): boolean { return target.isEmpty(); }, };