how I can get current Persian Date with time4J
in java?
PersianCalendar jalali = new PersianCalendar();
From the Javadoc of PersianCalendar
:
PlainDate today = SystemClock.inLocalView().today();
PersianCalendar jalali = today.transform(PersianCalendar.class);
I think there are multiple ways to do so:
PersianCalendar jalali = PersianCalendar.nowInSystemTime();
using transformation
PlainDate today = SystemClock.inLocalView().today();
PersianCalendar jalali = today.transform(PersianCalendar.class);
Hope it helps!