Skip to content

Convert

ali ghahremani edited this page Sep 18, 2018 · 2 revisions

DateConverter Class

to hijri:

DateModel hijri = DateConverter.GregorianToHijri(2018, 1, 1);
DateModel hijri = DateConverter.JalaliToHijri(1397, 1, 1);

to jalali

DateModel jalali = DateConverter.HijriToJalali(1440, 1, 1);
DateModel jalali = DateConverter.GregorianToJalali(2018, 1, 1);

to Gregorian

DateModel gregorian = DateConverter.HijriToGregorian(1440, 1, 1);
DateModel gregorian = DateConverter.JalaliToGregorian(1397, 1, 1);

DateTime Instance

JalaliDateTime jalaliDateTime = new JalaliDateTime(1397,1,1);
HijriDateTime hijriDateTime = jalaliDateTime.getHijriDateTime();
GregorianDateTime gregorianDateTime = jalaliDateTime.getGregorianDateTime();
Clone this wiki locally