-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcalendar.js
65 lines (59 loc) · 1.18 KB
/
calendar.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
'use strict'
const {feed_start_date, feed_end_date} = require('./feed_info').full
const allDay = {
service_id: 'all-day',
monday: '1',
tuesday: '1',
wednesday: '1',
thursday: '1',
friday: '1',
saturday: '1',
sunday: '1',
start_date: '20190301', // before feed_info.feed_start_date!
end_date: '20190820' // after feed_info.feed_end_date!
}
const onWorkingDays = {
service_id: 'on-working-days',
monday: '1',
tuesday: '1',
wednesday: '1',
thursday: '1',
friday: '1',
saturday: '1',
sunday: '0',
start_date: '20190308', // after feed_info.feed_start_date
end_date: '20190720' // before feed_info.feed_end_date
}
const onWeekends = {
service_id: 'on-weekends',
monday: '0',
tuesday: '0',
wednesday: '0',
thursday: '0',
friday: '0',
saturday: '1',
sunday: '1',
start_date: feed_start_date,
end_date: feed_end_date
}
const duringDST = {
service_id: 'during-dst',
monday: '0',
tuesday: '0',
wednesday: '0',
thursday: '0',
friday: '0',
saturday: '1',
sunday: '0',
start_date: '20190330',
end_date: '20190330',
}
module.exports = Object.assign([
allDay,
onWorkingDays, onWeekends,
duringDST,
], {
allDay, minimal: allDay,
onWorkingDays, onWeekends,
duringDST,
})