breejs / later

*Maintained fork of Later.* A javascript library for defining recurring schedules and calculating future (or past) occurrences for them. Includes support for using English phrases and Cron schedules. Works in Node and in the browser.
https://breejs.github.io/later/
MIT License
134 stars 13 forks source link

[discussion] Compose time intervals with after a specific datetime value #27

Open henpanta opened 2 years ago

henpanta commented 2 years ago

What would you like to discuss?

Hi!

I'd like to compose two, otherwise separately working schedule together.

1st schedule is: in text format: 'after 10:00am and before 11:00am also after 4:00pm and before 5:00pm' in JSON format: {schedules: [ { t_a: [36000], t_b: [39600], }, { t_a: [57600], t_b: [61200], }, ]}

2nd schedule is: in text format: 'after 6:00pm on the 24 day of August in 2022' in JSON format: {schedules: [ { t_a: [64800], D: [24], M: [8], Y: [2022], }, ]}

but when I compose it together, the 2nd part is ignored.

text: 'after 10:00am and before 11:00am also after 4:00pm and before 5:00pm also after 6:00pm on the 24 day of August in 2022' JSON: {schedules: [ { t_a: [36000], t_b: [39600], }, { t_a: [57600], t_b: [61200], }, { t_a: [64800], D: [24], M: [8], Y: [2022], }, ]}

What would the correct way to describe a schedule for two recurring intervals but only after a specific time and date?

thanks, Norbi

Checklist