問題描述
我正在尋找 Java 日歷類的一些子類,最好是回歷(伊斯蘭)日歷實現,但可能需要更多.有人知道可用于商業用途的庫嗎?
I am looking for some subclasses of the Java calendar class, preferably a Hijri (Islamic) calendar implementation, but will potentially require more. Does anyone know of a library that is available for commercial use?
我找到了 IBM 的 ICU 庫(這里),但是它們沒有擴展java.util.Calendar
而是編寫了自己的類,該類也依賴于自定義類;UDate
和 ULocale
.我正在嘗試 I18n 一個現有的 Java 應用程序,該應用程序已經有超過 400 次 Calendar 的使用,所以我最好堅持使用該類.有什么建議嗎?
I have found IBM's ICU library (here), however, they do not extend java.util.Calendar
and instead have written their own class which also replies on the custom classes; UDate
and ULocale
. I am attempting to I18n an existing java application which already has over 400 usages of Calendar so I ideally want to stick to that class. Any suggestions?
提前致謝.
推薦答案
與所有 Date API 問題一樣,答案是使用 Joda 如果可能,如果沒有,讓它成為可能.
As usual with all Date API questions the answer is use Joda if possible, if not, make it possible.
我也會對 IBM Date 類保持警惕,他們產生了當前的 Java 日期 API,雖然它是一個很大的地方,但這種實現對于其他產品來說并不是一個好兆頭.
I'd also be wary of IBM Date classes, they produced the current Java date API and while it's a big place, that implementation does not bode well for other offerings.
這篇關于java.util.Calendar 的子類可用于商業用途 - 即伊斯蘭日歷的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!