MCPcopy Create free account
hub / github.com/DHTMLX/scheduler / parseWeekday

Function parseWeekday

codebase/sources/dhtmlxscheduler.js:17135–17150  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

17133 return value;
17134 }
17135 function parseWeekday(value) {
17136 var days = value.split(",");
17137 return days.map(function(day) {
17138 if (day.length === 2) {
17139 return Days[day];
17140 }
17141 var parts = day.match(/^([+-]?\d{1,2})([A-Z]{2})$/);
17142 if (!parts || parts.length < 3) {
17143 throw new SyntaxError("Invalid weekday string: ".concat(day));
17144 }
17145 var n = Number(parts[1]);
17146 var wdaypart = parts[2];
17147 var wday = Days[wdaypart].weekday;
17148 return new Weekday(wday, n);
17149 });
17150 }
17151 var DateWithZone = function() {
17152 function DateWithZone2(date, tzid) {
17153 if (isNaN(date.getTime())) {

Callers 1

parseRruleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected