問題描述
我正在開發一個 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.
這篇關于Java 中 Jalali 日歷的一個好的日期轉換器?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!