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

Function parseWeekday

codebase/sources/dhtmlxscheduler.es.js:17131–17146  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

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

Callers 1

parseRruleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected