hijri


npm install moment-hijri

如果要使用 Hijri 日历,则可以使用 moment-hijri 插件。 moment-hijri 是基于 Umm al-Qura 计算得出的 Hijri 阴历的 moment 插件。 该插件由 Suhail Alkowaileet 开发。

当安装时,它将会封装 moment,且你将可以解析 Hijri 日期。 这是一个简短的示例:

m = moment('1410/8/28', 'iYYYY/iM/iD'); // 解析 Hijri 日期。
m.format('iYYYY/iM/iD [is] YYYY/M/D'); // 1410/8/28 is 1990/3/25

该仓库位于 github.com/xsoh/moment-hijri.

npm install moment-hijri

If you want to work with Hijri calendar then you can use moment-hijri plugin. moment-hijri is a moment plugin for the Hijri lunar calendar based on Umm al-Qura calculations. This plugin is developed by Suhail Alkowaileet.

When you install it, it will wrap moment and you will be able to parse Hijri dates. Here is a short example:

m = moment('1410/8/28', 'iYYYY/iM/iD'); // Parse a Hijri date.
m.format('iYYYY/iM/iD [is] YYYY/M/D'); // 1410/8/28 is 1990/3/25

The repository is located at github.com/xsoh/moment-hijri.