We can use SQLite’s DATE()
function to return the first, second, third, fourth, etc instance of a given day within a given year.
We can use the same technique to return the first Monday of each month in the year.
It’s not limited to Monday though. The same techniques can be used on Tuesday, Wednesday, Thursday, Friday, etc.
Continue reading