Code example for Date

Methods: getHours

0
		String since= "";
		//Setup 
		Time now = new Time();
		int dif = 0;
		now.setToNow();
		dif = now.hour-date.getHours();
		if(dif<0) {
			since = "invalid";
		} 
		else if(dif<24) {
			since = "hour";
		} 
		else if (dif<168) {
			dif/=24;
			since = "day";
		} 
		else if (dif<720) {
			dif/=168;
			since = "week";
		} 
		else if (dif<8760) {