如何在java中使用time4J
获取当前波斯日期?
PersianCalendar jalali = new PersianCalendar();
答案 0 :(得分:1)
我认为有多种方法可以做到这一点:
PersianCalendar jalali = PersianCalendar.nowInSystemTime();
使用转换
PlainDate today = SystemClock.inLocalView().today();
PersianCalendar jalali = today.transform(PersianCalendar.class);
希望它有所帮助!
答案 1 :(得分:0)
PlainDate today = SystemClock.inLocalView().today();
PersianCalendar jalali = today.transform(PersianCalendar.class);