Questions tagged [calendar-computations]

This tag is for questions about combinatorial and computational issues with regards to calendar systems. A typical, well-known mathematical result in this direction is John Conway's Doomsday Algorithm for computing the "day of the week" associated to a given date.

Calendar computations have a long history within mathematics. In fact, much of ancient mathematics (such as those developed by the Babylonians, Mayans, and Chinese) stem from an effort to try to understand the mathematical relationships (especially the quasi-periodic nature) between the solar year, the lunar month, and the sidereal day.

With the development of the Gregorian calendar, in modernity the academic interest in calendar computations have somewhat waned. But there are still many interesting recreational problems related to the computations of dates, the interaction between lunar and solar calendars, and relationship between the human concept of the week with more astronomically based measurements of time.

131 questions
1
vote
1 answer

Formula to calculate difference between tow dates

I am working on getting date difference I have a formula to calculate it as follows 365*year + year/4 - year/100 + year/400 + date + (153*month+8)/5 but its not working on leap years like if dates are 1-1-2012 and 1-1-2013 the difference should be…
1
vote
1 answer

Hash function from date to biweekly event

My trash gets picked up every other Tuesday. Now it's easy to remember what day of the week it is, but not so easy to remember if it's a skip week or not - especially if you miss it sometimes. You have to count weeks from the last week you remember…
1
vote
3 answers

What is the minimum number days between one Friday the $13$th and the next Friday the $13$th?

What is the minimum number days between one Friday the $13$th and the next Friday the $13$th?(Assume that the year is a leap year)
1
vote
0 answers

Lunisolar calendar: what phase was the moon X years ago on the spring equinox?

How would I go around answering these questions (e.g., for $X=10,000$ -- IOW, historical observations are not available and the time is too long ago to rely on a fixed calendar): How many days ago was the spring equinox X years ago? What phase…
sds
  • 4,533
1
vote
0 answers

Wikitext, #time parser function: Find last month with five Mondays

in Asphalt Wiki, we have templates for repeating events in the Asphalt games. These templates also display if an event is currently running. In one of the games, events are bound to days of the month and their position within the month, for example,…
1
vote
1 answer

Formula to find the date given a specific year, month, and day of the week

I need a formula to get me to the first or third specified day of the week of the following year. So, here is the information I am presented. I have a year (y), a month (m) and a day of the week (n). From those variables I need to find date the next…
cain4355
  • 113
1
vote
4 answers

If I wanted to determine today's date based on my birthdate, how could I do that mathematically?

Let's say for example my birthday is August 17, 1996. Each year has 365 days except leap years. If I didn't know whether 1996 was a leap year or not, is there a way I can see how many days I've been alive (obviously without looking at a calendar or…
1
vote
1 answer

Determine the busiest day from a list of dates.

There are N date ranges which include check-in date and check-out date. How can I find out the busiest day? Example: 2016-10-12 to 2016-10-18 2016-10-11 to 2016-10-15 2016-10-13 to 2016-10-14 2016-10-12 to 2016-10-13 From these dates, it is…
Jaguar
  • 485
1
vote
2 answers

Is it possible to have such date and day combination that doesn't occur on any year ever?

My friend told me a story yesterday and said "It happened on March 13th and it was Friday". I was thinking about this and I've a question. Is it possible to have such date and day combination that it doesn't occur on any year ever? For example,…
bodacydo
  • 3,922
1
vote
1 answer

Proof about Friday the 13th

Few years ago I learned that there are more friday the 13th in the 400 years period of our calendar, than all other days, but I have never found any proof ! Can you help me please ?
ParaH2
  • 1,672
1
vote
3 answers

Calculate difference in days to reference date

This question is related to a programming question. Because I think it's pure mathematic I post this question here. I want to calculate the difference in days to a reference point. Therefore I have two inputs: indexPath.Item: natural number between…
testing
  • 135
1
vote
0 answers

Question about Gauss' Determination of the first day of the year.

On the wikipedia article http://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week#Gauss.27_algorithm it explains the Gaussian Formula for calculating the first day of the year. I was wondering why the co-efficients are what they are. I…
Rinslep
  • 21
1
vote
1 answer

4-4-5 retail calendar - calculating extra week

I have been tasked with making a 4-4-5 calendar for a retail reporting system (in javascript using moment.js but this shouldn't matter). http://en.wikipedia.org/wiki/4-4-5_calendar A 52 week year is divided in 4 * 13 week segments (4 + 4 + 5) - so…
daviestar
  • 121
0
votes
1 answer

calendars problem using zellers formulae

i've solved most of the day finding problems using zellers formulae $$ Z= K + \frac{13M -1}{5} + D +\frac{D}{4} + \frac{C}{4} - 2C $$ where $K$ = given $M$ = given month no. ( but here month count starts from march ) $D$ = last 2 digits of the…
0
votes
1 answer

How long would it have taken the Swedes to align their calendar with the Gregorian calendar?

According to http://www.clas.ufl.edu/users/ufhatch/pages/03-Sci-Rev/SCI-REV-Home/Historical-Research/Calendars/gregorian_calendar_history.html "The Swedish dithered. In 1700 they began what was intended to be a gradual switch to the Gregorian…
Robert Soupe
  • 14,663