Bringing History to the Modern Web: Introducing moment-shahanshahi for JavaScript & React π
As developers, we often deal with timezones and calendars. While the Gregorian calendar is the global standard, many cultures use their own traditional systems. In the Iranian context, while the So...

Source: DEV Community
As developers, we often deal with timezones and calendars. While the Gregorian calendar is the global standard, many cultures use their own traditional systems. In the Iranian context, while the Solar Hijri (Jalaali) calendar is widely used, there is also the Iranian Imperial (Shahanshahi) Calendar system dating back to the founding of the Achaemenid Empire by Cyrus the Great. Today, Iβm excited to introduce moment-shahanshahi, a lightweight npm package that makes it incredibly easy to integrate the Shahanshahi calendar into your JavaScript and React applications. Why a new package? While there are excellent libraries like moment-jalaali for Persian dates, converting those dates to the Imperial era (which starts 1,180 years before the Hijri era) usually requires manual calculations and custom formatting logic. I built moment-shahanshahi to bridge this gap, providing a seamless wrapper around the reliable moment core while adding specific support for the Imperial era. Key Features β
Fam