What is this? Output a data from a set of data which in schedule.
What timezone API i using? https://worldtimeapi.org/api/timezone/
props:
name | description | type | default |
---|---|---|---|
list | Store the data of schedule | Schedule Object | |
location | What is your timezone | string | 'Asia/Hong_Kong' |
rateMs | how long to update the timer | int | 10000 |
limitRequestCount | what is the limit about sending the request? | int | 3 |
Schedule Object:
{
start: { Y, M, D, h, m, s, ms, d },
end: { Y, M, D, h, m, s, ms, d },
specific: { Y, M, D, h, m, s, ms, d }
action: {}
}
Date Unit:
name | description |
---|---|
Y | Year |
M | Month |
D | Day |
h | Hour |
m | Minute |
s | Second |
ms | Millisecond |
d | week |
Schedule Logical: local time <= end local time >= start local time === specific
import RunInTime from 'react-output-schedule';
<RunInTime {...{
lists: [
{
action: {},
name: 'default action'
},
{
end: { Y: 2021, M: 9, D: 28 },
action: {},
name: 'end at Sept 29, 2021 00:00:00'
},
{
end: { Y: 2021, M: 9, D: 28, h: 0, m: 0, s: 0 },
action: {},
name: 'end at Sept 28, 2021 00:00:00'
},
{
start: { d: 3, h: 10 },
end: { d: 4, h: 10 },
action: {},
name: 'test wednesday 10:00 to thursday 11:00'
},
{
specific: { d: 5 },
action: {},
name: 'test on firday'
},
],
location: 'Asia/Hong_Kong'
}}/>