question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nth Day of the Month, eg, 2nd Saturday of the month

See original GitHub issue

It would be great if it was possible to use this to get the nth day of the month. For example, for the second Saturday of the month something like this .nthDayOfMonth(Saturday, 2) would be really useful for community groups, churches, choirs etc

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kubanac95commented, Sep 9, 2021

Was looking for this when I found the following library. Maybe someone still needs it 😃

https://github.com/FraserHamilton/dayjs-recur

0reactions
edjwcommented, Sep 11, 2021

From the readme of dayjs-recur

// A weekOfMonthByDay interval is available for combining with
// the daysOfWeek to achieve "nth weekday of month" recurrences.
// The following matches every 1st and 3rd Thursday of the month.
// (Note this cannot be combined at the dayjs with every(x).months() expression) 
const cal = dayjs.recur().every("Thursday").every([0, 2]).weeksOfMonthByDay();
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Find Nth Weekday in Month - Contextures
This video shows how to find the Nth weekday in a specific month and year, by using the WORKDAY.INTL function in an Excel...
Read more >
How to Calculate Nth Day of Week in a Month in Excel
To get the Nth weekday of the week in a month, for example 1st, 2nd, 3rd Friday you can use a formula based...
Read more >
Highlight the 2nd Saturday and Sunday of any Given Month
In this video, we highlight the second Saturday and Sunday of any given month with Conditional Formatting.I was asked this question last ...
Read more >
Get nth day of week in month - Excel formula - Exceljet
In the generic form of the formula, n represents "nth". Inside WEEKDAY, the first of the month is again calculated, then 8 days...
Read more >
Nth Day of the Year Calculator - Day Number - dCode.fr
Automatic method: use dCode and indicate the day and month of a date, and if the year is leap year. Example: The 1st...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found