UNPKG
@ipohjs/calendar
Version:
latest (0.1.0-rc.8)
rc (0.1.0-rc.0)
0.1.0-rc.8
0.1.0-rc.7
0.1.0-rc.6
0.1.0-rc.5
0.1.0-rc.4
0.1.0-rc.3
0.1.0-rc.2
0.1.0-rc.1
0.1.0-rc.0
Minimal module to compute a calendar
github.com/ipohjs/webmod/packages/calendar
ipohjs/webmod
@ipohjs/calendar
/
dist
/
helpers
/
normalize-weekday.js
6 lines
•
274 B
JavaScript
View Raw
1
2
3
4
5
6
import
{ toValidWeekday }
from
'./to-valid-weekday.js'
;
export
function
normalizeWeekday
(
weekDay, firstDayOfWeek, showWeekNumber
) {
const
x =
toValidWeekday
(weekDay - firstDayOfWeek);
return
showWeekNumber ?
1
+ x : x; }
//# sourceMappingURL=normalize-weekday.js.map