UNPKG

luxon-hijri

Version:

A Hijri date converter based on the Umm al-Qura calendar system, using Luxon for date manipulations.

44 lines (43 loc) 1.68 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatPatterns = void 0; // formatPatterns.ts // Define a mapping of Hijri format tokens to their meanings exports.formatPatterns = { // Hijri Year iYYYY: 'Hijri year (4 digits)', iYY: 'Hijri year (2 digits)', // Hijri Month iMM: 'Hijri month (2 digits, zero-padded)', iM: 'Hijri month (1 or 2 digits without zero-padding)', iMMM: 'Hijri month (abbreviated name)', iMMMM: 'Hijri month (full name)', // Hijri Day iDD: 'Hijri day of the month (2 digits, zero-padded)', iD: 'Hijri day of the month (1 or 2 digits without zero-padding)', // Hijri Weekday iE: 'Hijri weekday (1 digit)', iEEE: 'Hijri weekday (abbreviated name)', iEEEE: 'Hijri weekday (full name)', // Hour, Minute, Second // These can remain the same as in Gregorian as they don’t change in Hijri HH: 'Hour (2 digits, zero-padded, 24-hour clock)', H: 'Hour (1 or 2 digits without zero-padding, 24-hour clock)', hh: 'Hour (2 digits, zero-padded, 12-hour clock)', h: 'Hour (1 or 2 digits without zero-padding, 12-hour clock)', mm: 'Minute (2 digits, zero-padded)', m: 'Minute (1 or 2 digits without zero-padding)', ss: 'Second (2 digits, zero-padded)', s: 'Second (1 or 2 digits without zero-padding)', // AM/PM a: 'AM/PM marker', // Other iooo: 'Hijri era (abbreviated)', ioooo: 'Hijri era (full)', // Timezone z: 'Timezone (abbreviated)', zz: 'Timezone (full)', Z: 'Timezone offset from UTC', }; // Export the patterns for use in the rest of the package exports.default = exports.formatPatterns;