UNPKG

@ribajs/luxon

Version:

Luxon (time library) module for Riba.js

19 lines (17 loc) 546 B
import { Formatter } from "@ribajs/core"; import { Interval } from "luxon"; /** * Return whether this Interval has the same start and end as the specified Interval. */ export const LuxonIntervalEqualsFormatter: Formatter = { name: "lx-interval-equals", /** * @see https://moment.github.io/luxon/docs/class/src/datetime.js~DateTime.html#instance-method-equals * @param target Interval * @param other Interval * @returns boolean */ read(target: Interval, other: Interval): boolean { return target.equals(other); }, };