Closed MHKalantarian closed 3 years ago
This code returns this values and it seems every time a conversion is happening day is getting reduced by 1 Code:
PersianDate date = new PersianDate();
date.setShYear(binding.yearNp.getValue());
date.setShMonth(binding.monthNp.getValue());
date.setShDay(binding.dayNp.getValue());
Log.e("Date", binding.yearNp.getValue() + "/" + binding.monthNp.getValue() + "/" + binding.dayNp.getValue());
Log.e("Date", date.getShYear() + "/" + date.getShMonth() + "/" + date.getShDay());
Log.e("Date", new PersianDateFormat("Y/m/d").format(new PersianDate(date.getTime())) + " _ " + date.getTime());
Result:
E/Date: 1360/3/8
E/Date: 1360/3/7
E/Date: 1360/03/06 _ 359885553000
Bug fixed in v1.0
Date converted to epoch
1360/08/02 > 372780535866 UNIX
But when I try to reverse this specific date usingnew PersianDateFormat("Y/m/d").format(new PersianDate(372780535866 ))
it returns1360/07/01