Java 中 Jalali 日历的一个好的日期转换器?
我正在开发一个 Java 应用程序并且我有一个 timeStamp
(在 long
中).我可以轻松地使用此代码将其更改为公历日期:
I'm developing a Java App and I have a timeStamp
(in long
). I can easily use this code to change it to a Gregorian date:
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(timeStamp);
但我需要在 Jalali 日历中显示日期.我搜索但没有找到任何好的图书馆.您知道用于转换(或从 timeStamp
创建 Jalali 格式的日期)的可靠且良好的库吗?我不需要实现或算法,因为这个问题太麻烦而且有很多规则,我需要一个可靠的解决方案
But I need to have the date in Jalali Calendar. I searched but didn't found any good library. Do you know a reliable and good library for converting (or creating dates in Jalali format from timeStamp
)? I don't need an implementation or an algorithm, cause this issue is too buggy and has a lot of rules, I need a reliable solution
推荐答案
看看这个:https://github.com/amirmehdizadeh/JalaliCalendar
代码看起来不错,基于 maven 的项目,大量的单元测试.
The code looks nice, maven based project, a lot of unit tests.
相关文章