UNPKG

@ribajs/luxon

Version:

Luxon (time library) module for Riba.js

17 lines (15 loc) 455 B
import { Formatter } from "@ribajs/core"; import { DateTime } from "luxon"; /** * Get the human readable long month name, such as 'October'. */ export const LuxonMonthLongFormatter: Formatter = { name: "lx-month-long", /** * @see https://moment.github.io/luxon/docs/class/src/datetime.js~DateTime.html#instance-get-monthLong * @param target can be a Luxon DateTime object */ read(target: DateTime) { return target.monthLong; }, };