Code example for Time

Methods: after, before

0
		 
		Log.i("DateAlwaysSober", "Now: " + now);
		 
		String[] splitDate = time.split(":");
		 
		Time t = new Time(	Integer.parseInt(splitDate[0]), 
							Integer.parseInt(splitDate[1]), 
							0 
						 ); 
		 
		Log.i("DateAlwaysSober", "Schedule Time: " + t);
		 
		if ( t.before(now) )
			return 1; 
		else if ( t.after(now) )
			return -1; 
		else 
			return 0; 
	} 
	 
}