context: dojo.widget.TimePicker.util = new function() {	// utility functions	this.toRfcDateTime = function(jsDate) {		if(!jsDate) {			jsDate = new Date();		}		jsDate.setSeconds(0);		return dojo.date.strftime(jsDate, "%Y-%m-%dT%H:%M:00%z"); //FIXME: use dojo.date.toRfc3339 instead	}	this.fromRfcDateTime = function(rfcDate, useDefaultMinutes, isAnyTime) {		var tempDate = new Date();		if(!rfcDate || rfcDate.indexOf("T")==-1) {			if(useDefaultMinutes) {				tempDate.setMinutes(Math.floor(tempDate.getMinutes()/5)*5);			} else {				tempDate.setMinutes(0);			}		} else {			var tempTime = rfcDate.split("T")[1].split(":");			// fullYear, month, date			var tempDate = new Date();			tempDate.setHours(tempTime[0]);			tempDate.setMinutes(tempTime[1]);		}		return tempDate;	}	this.toAmPmHour = function(hour) {		var amPmHour = hour;		var isAm = true;		if (amPmHour == 0) {			amPmHour = 12;		} else if (amPmHour>12) {			amPmHour = amPmHour - 12;			isAm = false;		} else if (amPmHour == 12) {			isAm = false;		}		return [amPmHour, isAm];	}	this.fromAmPmHour = function(amPmHour, isAm) {		var hour = parseInt(amPmHour, 10);		if(isAm && hour == 12) {			hour = 0;		} else if (!isAm && hour<12) {			hour = hour + 12;		}		return hour;	}}
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/TimePicker.js/clean/www/resources/dojo-ajax/src/widget/TimePicker.js