-1

I am using ummalqura-calendar to Show Hijri Date in my Android Application

am getting date from back end Service as UNIXTIMESTAMP, How can i use this format with the library

aya salama
  • 903
  • 1
  • 10
  • 29

1 Answers1

1

If you have a unix time stamp (seconds since epoch), you should be able to just multiply the timestamp by 1000 to get milliseconds and use setTime;

Calendar uCal = new UmmalquraCalendar();
uCal.setTime(new Date(myTimestamp * 1000));

If you already have the timestamp in milliseconds, just leave out the multiplication.

Joachim Isaksson
  • 176,943
  • 25
  • 281
  • 294