HTML-Dojo

 view release on metacpan or  search on metacpan

lib/HTML/Dojo/src.pm  view on Meta::CPAN

												var t = set.concat(subset);
												set = t;
											}
										}
									}
								} else {
									var subset = [];
									for (var zz = 0; zz < set.length; zz++) {
										var newDate = new Date(set[zz]);
										if (regexResult[1] == "-") {
											if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) {
												newDate.setDate(dojo.date.getDaysInMonth(set[zz]) - regexResult[2]);
											}
										} else {
											if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) {
												newDate.setDate(regexResult[2]);
											}
										}
										subset.push(newDate);
									}
									tmp = set.concat(subset);
									set = tmp;
								}
							}
						}
					} else {
						dojo.debug("TODO: byday within a yearly rule without a bymonth");
					}
				}
				dojo.debug("TODO: Process BYrules for units larger than frequency");
				var tmp = recurranceSet.concat(set);
				recurranceSet = tmp;
			}
		}
		recurranceSet.push(dtstart);
		return recurranceSet;
	}, getDate:function () {
		return dojo.date.fromIso8601(this.dtstart.value);
	}});
	var VTimeZoneProperties = [_P("tzid", 1, true), _P("last-mod", 1), _P("tzurl", 1)];
	dojo.cal.iCalendar.VTimeZone = function (body) {
		this.name = "VTIMEZONE";
		this._ValidProperties = VTimeZoneProperties;
		dojo.cal.iCalendar.Component.call(this, body);
	};
	dojo.inherits(dojo.cal.iCalendar.VTimeZone, dojo.cal.iCalendar.Component);
	var VTodoProperties = [_P("class", 1), _P("completed", 1), _P("created", 1), _P("description", 1), _P("dtstart", 1), _P("geo", 1), _P("last-mod", 1), _P("location", 1), _P("organizer", 1), _P("percent", 1), _P("priority", 1), _P("dtstamp", 1), _P("s...
	dojo.cal.iCalendar.VTodo = function (body) {
		this.name = "VTODO";
		this._ValidProperties = VTodoProperties;
		dojo.cal.iCalendar.Component.call(this, body);
	};
	dojo.inherits(dojo.cal.iCalendar.VTodo, dojo.cal.iCalendar.Component);
	var VJournalProperties = [_P("class", 1), _P("created", 1), _P("description", 1), _P("dtstart", 1), _P("last-mod", 1), _P("organizer", 1), _P("dtstamp", 1), _P("seq", 1), _P("status", 1), _P("summary", 1), _P("uid", 1), _P("url", 1), _P("recurid", 1...
	dojo.cal.iCalendar.VJournal = function (body) {
		this.name = "VJOURNAL";
		this._ValidProperties = VJournalProperties;
		dojo.cal.iCalendar.Component.call(this, body);
	};
	dojo.inherits(dojo.cal.iCalendar.VJournal, dojo.cal.iCalendar.Component);
	var VFreeBusyProperties = [_P("contact"), _P("dtstart", 1), _P("dtend"), _P("duration"), _P("organizer", 1), _P("dtstamp", 1), _P("uid", 1), _P("url", 1), _P("attendee"), _P("comment"), _P("freebusy"), _P("rstatus")];
	dojo.cal.iCalendar.VFreeBusy = function (body) {
		this.name = "VFREEBUSY";
		this._ValidProperties = VFreeBusyProperties;
		dojo.cal.iCalendar.Component.call(this, body);
	};
	dojo.inherits(dojo.cal.iCalendar.VFreeBusy, dojo.cal.iCalendar.Component);
	var VAlarmProperties = [[_P("action", 1, true), _P("trigger", 1, true), [_P("duration", 1), _P("repeat", 1)], _P("attach", 1)], [_P("action", 1, true), _P("description", 1, true), _P("trigger", 1, true), [_P("duration", 1), _P("repeat", 1)]], [_P("a...
	dojo.cal.iCalendar.VAlarm = function (body) {
		this.name = "VALARM";
		this._ValidProperties = VAlarmProperties;
		dojo.cal.iCalendar.Component.call(this, body);
	};
	dojo.inherits(dojo.cal.iCalendar.VAlarm, dojo.cal.iCalendar.Component);
}});


__CPAN_FILE__ src/cal/iCalendar.js
/*
	Copyright (c) 2004-2006, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/community/licensing.shtml
*/



dojo.provide("dojo.cal.iCalendar");
dojo.require("dojo.lang.common");
dojo.require("dojo.cal.textDirectory");
dojo.require("dojo.date.common");
dojo.require("dojo.date.serialize");
dojo.cal.iCalendar.fromText = function (text) {
	var properties = dojo.cal.textDirectory.tokenise(text);
	var calendars = [];
	for (var i = 0, begun = false; i < properties.length; i++) {
		var prop = properties[i];
		if (!begun) {
			if (prop.name == "BEGIN" && prop.value == "VCALENDAR") {
				begun = true;
				var calbody = [];
			}
		} else {
			if (prop.name == "END" && prop.value == "VCALENDAR") {
				calendars.push(new dojo.cal.iCalendar.VCalendar(calbody));
				begun = false;
			} else {
				calbody.push(prop);
			}
		}
	}
	return calendars;
};
dojo.cal.iCalendar.Component = function (body) {
	if (!this.name) {
		this.name = "COMPONENT";
	}
	this.properties = [];

lib/HTML/Dojo/src.pm  view on Meta::CPAN

											var t = set.concat(subset);
											set = t;
										}
									}
								}
							} else {
								var subset = [];
								for (var zz = 0; zz < set.length; zz++) {
									var newDate = new Date(set[zz]);
									if (regexResult[1] == "-") {
										if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) {
											newDate.setDate(dojo.date.getDaysInMonth(set[zz]) - regexResult[2]);
										}
									} else {
										if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) {
											newDate.setDate(regexResult[2]);
										}
									}
									subset.push(newDate);
								}
								tmp = set.concat(subset);
								set = tmp;
							}
						}
					}
				} else {
					dojo.debug("TODO: byday within a yearly rule without a bymonth");
				}
			}
			dojo.debug("TODO: Process BYrules for units larger than frequency");
			var tmp = recurranceSet.concat(set);
			recurranceSet = tmp;
		}
	}
	recurranceSet.push(dtstart);
	return recurranceSet;
}, getDate:function () {
	return dojo.date.fromIso8601(this.dtstart.value);
}});
var VTimeZoneProperties = [_P("tzid", 1, true), _P("last-mod", 1), _P("tzurl", 1)];
dojo.cal.iCalendar.VTimeZone = function (body) {
	this.name = "VTIMEZONE";
	this._ValidProperties = VTimeZoneProperties;
	dojo.cal.iCalendar.Component.call(this, body);
};
dojo.inherits(dojo.cal.iCalendar.VTimeZone, dojo.cal.iCalendar.Component);
var VTodoProperties = [_P("class", 1), _P("completed", 1), _P("created", 1), _P("description", 1), _P("dtstart", 1), _P("geo", 1), _P("last-mod", 1), _P("location", 1), _P("organizer", 1), _P("percent", 1), _P("priority", 1), _P("dtstamp", 1), _P("se...
dojo.cal.iCalendar.VTodo = function (body) {
	this.name = "VTODO";
	this._ValidProperties = VTodoProperties;
	dojo.cal.iCalendar.Component.call(this, body);
};
dojo.inherits(dojo.cal.iCalendar.VTodo, dojo.cal.iCalendar.Component);
var VJournalProperties = [_P("class", 1), _P("created", 1), _P("description", 1), _P("dtstart", 1), _P("last-mod", 1), _P("organizer", 1), _P("dtstamp", 1), _P("seq", 1), _P("status", 1), _P("summary", 1), _P("uid", 1), _P("url", 1), _P("recurid", 1)...
dojo.cal.iCalendar.VJournal = function (body) {
	this.name = "VJOURNAL";
	this._ValidProperties = VJournalProperties;
	dojo.cal.iCalendar.Component.call(this, body);
};
dojo.inherits(dojo.cal.iCalendar.VJournal, dojo.cal.iCalendar.Component);
var VFreeBusyProperties = [_P("contact"), _P("dtstart", 1), _P("dtend"), _P("duration"), _P("organizer", 1), _P("dtstamp", 1), _P("uid", 1), _P("url", 1), _P("attendee"), _P("comment"), _P("freebusy"), _P("rstatus")];
dojo.cal.iCalendar.VFreeBusy = function (body) {
	this.name = "VFREEBUSY";
	this._ValidProperties = VFreeBusyProperties;
	dojo.cal.iCalendar.Component.call(this, body);
};
dojo.inherits(dojo.cal.iCalendar.VFreeBusy, dojo.cal.iCalendar.Component);
var VAlarmProperties = [[_P("action", 1, true), _P("trigger", 1, true), [_P("duration", 1), _P("repeat", 1)], _P("attach", 1)], [_P("action", 1, true), _P("description", 1, true), _P("trigger", 1, true), [_P("duration", 1), _P("repeat", 1)]], [_P("ac...
dojo.cal.iCalendar.VAlarm = function (body) {
	this.name = "VALARM";
	this._ValidProperties = VAlarmProperties;
	dojo.cal.iCalendar.Component.call(this, body);
};
dojo.inherits(dojo.cal.iCalendar.VAlarm, dojo.cal.iCalendar.Component);


__CPAN_DIR__ src/date
__CPAN_FILE__ src/date/common.js
/*
	Copyright (c) 2004-2006, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/community/licensing.shtml
*/



dojo.provide("dojo.date.common");
dojo.date.setDayOfYear = function (dateObject, dayOfYear) {
	dateObject.setMonth(0);
	dateObject.setDate(dayOfYear);
	return dateObject;
};
dojo.date.getDayOfYear = function (dateObject) {
	var fullYear = dateObject.getFullYear();
	var lastDayOfPrevYear = new Date(fullYear - 1, 11, 31);
	return Math.floor((dateObject.getTime() - lastDayOfPrevYear.getTime()) / 86400000);
};
dojo.date.setWeekOfYear = function (dateObject, week, firstDay) {
	if (arguments.length == 1) {
		firstDay = 0;
	}
	dojo.unimplemented("dojo.date.setWeekOfYear");
};
dojo.date.getWeekOfYear = function (dateObject, firstDay) {
	if (arguments.length == 1) {
		firstDay = 0;
	}
	var firstDayOfYear = new Date(dateObject.getFullYear(), 0, 1);
	var day = firstDayOfYear.getDay();
	firstDayOfYear.setDate(firstDayOfYear.getDate() - day + firstDay - (day > firstDay ? 7 : 0));
	return Math.floor((dateObject.getTime() - firstDayOfYear.getTime()) / 604800000);
};
dojo.date.setIsoWeekOfYear = function (dateObject, week, firstDay) {
	if (arguments.length == 1) {
		firstDay = 1;
	}
	dojo.unimplemented("dojo.date.setIsoWeekOfYear");



( run in 0.737 second using v1.01-cache-2.11-cpan-39bf76dae61 )