I want to use GregorianCalendar instead of Time class, how android documentation suggest, but how manage julian day for store a date as a int in my sqlLite db?
How can i convert this code?
public static long normalizeDate(long startDate) {
// normalize the start date to the beginning of the (UTC) day
Time time = new Time();
time.set(startDate);
int julianDay = Time.getJulianDay(startDate, time.gmtoff);
return time.setJulianDay(julianDay);
}
And when i query a row how can get the normal date by julian day?