UNPKG

738 BSource Map (JSON)View Raw
1{"version":3,"file":"to-valid-weekday.js","sourceRoot":"","sources":["../../../src/calendar/helpers/to-valid-weekday.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,IAAI,OAAO,IAAI,CAAC,IAAI,OAAO,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAE1D,MAAM,aAAa,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzE,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC","sourcesContent":["export function toValidWeekday(weekday: number): number {\n if (weekday >= 0 && weekday < 7) return Math.abs(weekday);\n\n const weekdayOffset = weekday < 0 ? 7 * Math.ceil(Math.abs(weekday)) : 0;\n\n return (weekdayOffset + weekday) % 7;\n}\n"]}
\No newline at end of file