Equations: "Last Sunday in January"... and 25 more

This project was awarded to tjtj for $40 USD.

Get free quotes for a project like this
Employer working
Awarded to:
Project Budget
$30 - $250 USD
Total Bids
Project Description

Generate equations for the following dates-of-the-month. This is a small project for someone who is good at modular arithmatic.

Most of these will have a format, like:
(2 + 6 * thisYear - floor (thisYear / 4) ) % 7 + 1
31 -( floor (thisYear * 5 / 4) + 1) % 7

If you need more complexity for some, you can write in a syntax similar to C or Javascript.


Last Sunday in January

Third Sunday in February

Second Sunday in March
First Friday on or after 15 April
Third Sunday in March
Last Thursday of March
Last Sunday in March
Fourth Friday in March

First Sunday in April
Last Friday before April 2
First Sunday on or after 6 April
First Friday in April
Last Friday in April
First Sunday in April

Last Thursday in September
Last Friday in September
First Sunday in September
First Sunday on or after 8 September

First Sunday in October
First Friday on or after 15 October
Third Sunday in October
Last Friday in October
Last Sunday in October

First Sunday in November

The Sunday between Rosh Hashana and Yom Kippur -- Refer to: [url removed, login to view]


Thanks, I look forward to your bid.

- Michael

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online