Code example for Time

Methods: format3339setJulianDay

0
		Time localtime = new Time(Time.getCurrentTimezone());
		localtime.setToNow();
		int julianToday = Time.getJulianDay(localtime.toMillis(false),
				localtime.gmtoff);
 
		Time time = new Time(Time.TIMEZONE_UTC);
		time.setJulianDay(julianToday + i);
		time.hour = 0;
		time.minute = 0;
		time.second = 0;
		Log.d("dragdate", "" + i + " days ago: " + time.format3339(false));
 
		return time.format3339(false);
	} 
 
	public static boolean dateBefore(final String itemDate,
			final String referenceDate) {
		// Fix for timezone issue. We don't care about them 
		// A date like 2013-03-05T00:00 will be abbreviated 
		// to 2013-03-05 
Experience pair programming with AI  Get Codota for Java