0

I am using later.js (meteor package, voidale:later-js-tz@1.1.9) to schedule events, using the later.parse.text() parser. I can schedule weekly events on a given weekday with no problem, with strings like 'at 11:00 on Monday'.

But I get parse errors trying things like 'at 11:00 on every second Monday of every month'.

Q: Is there a way to do this in later.js, or if not, is there a javascript library available that does support this?

Thanks.

2 Answers2

0

I found moment-recur, which supports this nth-weekday of a month in its API, but doesn't have a text parser.

I then used PEGjs to build a text parser which outputs the necessary parameters, which I use in a straightforward way to call the moment-recur API.

0

This will work: 'every 2 weeks on monday at 11am'

clausfod
  • 315
  • 1
  • 3
  • 7