admin管理员组文章数量:1126335
We are looking to display different calendars (Persian, Buddhist, Japanese), along with their list of month names, the number of days in a month, day names and where the start of the year is relative to the Gregorian calendar.
I had done something equivalent in Java many years ago, using ICU4J, but I am not sure how to go about this in Javascript?
We looked at the Intl.Locale.getCalendars(), but it is not clear how we could leverage this API for what we want to do.
We generally use luxon for our date handling, but in this case it only seems suitable for outputting the formatted date for the given calendar. For example:
DateTime.now().reconfigure({ outputCalendar: "persian" }).toLocaleString()
Does anyone have any suggestions on how to achieve what we are wanting to do?
Edit: Currently looking to see if the package world-calendars could do the job.
本文标签: javascriptGetting months in a localised calendarusing NodejsStack Overflow
版权声明:本文标题:javascript - Getting months in a localised calendar, using Nodejs? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736684413a1947588.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论