Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nth weekday of month #220

Open
ricardonogues opened this issue Dec 6, 2017 · 2 comments
Open

Nth weekday of month #220

ricardonogues opened this issue Dec 6, 2017 · 2 comments

Comments

@ricardonogues
Copy link

Is it possible to generate a recurrence like 'every last Friday of the month'?

@vfonic
Copy link

vfonic commented Dec 16, 2017

Hi @ricardonogues!

I needed the same functionality so I came up with this:

var time = date.toTimeString().split(' ')[0]; // get hour and minute (there are better ways to do this)
var sched = later.parse.recur().on(time).time();
var dayOfWeek = later.dayOfWeek.val(date); // NOTE this line might mess up your `date` instance
return later.schedule(sched.on(0).dayOfWeekCount().on(dayOfWeek).dayOfWeek());

@moltar
Copy link

moltar commented Mar 24, 2020

Was trying to do the same with Renovate Bot:

before 3am on the first weekday of the month

And it seems not to be supported, yet every weekday is supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants