The world calendar (also universal calendar) is a proposal to reconstruct the Gregorian calendar to a calendar where the days of the week are in the same week every year. This includes Christmas and New Year's day. The concept for this calendar was already developed in 1834 by Marco Mastrofini, but it was only one hundred years later that Elisabeth Achelis drew attention to it when she founded the World Calendar Association (WCA) in 1930. This organization argued this calendar should be put in use, first in the League of Nations and later in the UNO.

The world calendar is a fairly simple adaption of the 1582 Gregorian calendar. A year is divided in 12 months. Every year starts at Sunday 1 January and after that, there's always a fixed combination of the date and day of the week. The year is divided in 4 quarters. Every quarter counts 91 days. January, April, July and October are always the first month of a quarter and the first day is always a Sunday. These months count 31 days, the two next months count 30 days. This way, there would always be 364 days in a year. In order to come to a duration of 365 days, 5 hours, 48 minutes and 45,1814 seconds (an entire rotation of the earth around the sun) one leap day is needed yearly and a second leap day every four years (which is the same case in the Gregorian calendar). The necessary, yearly leap day would be 31 December. That would not be a Sunday that comes after Saturday 30 December, but a global bank holiday called World Day. After that comes 1 January — the beginning of the next year. In leap years, there is an extra day in the summer. That would be 31 June. The WCA strongly argued inserting the World calendar in 2002, because 1 January would then be a Sunday.

January
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
February
Su Mo Tu We Th Fr Sa
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
March
Su Mo Tu We Th Fr Sa
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
April
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
May
Su Mo Tu We Th Fr Sa
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
June
Su Mo Tu We Th Fr Sa
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
 
leap day
July
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
August
Su Mo Tu We Th Fr Sa
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
September
Su Mo Tu We Th Fr Sa
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
October
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
November
Su Mo Tu We Th Fr Sa
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
December
Su Mo Tu We Th Fr Sa
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
 
World Day

The advantage of this calendar is its simple structure. The year always starts on a Sunday and every other date is always in the same week. The quarters, which each consist of 91 days, count exactly 13 weeks. Because of this, statistics that are based on numbers per quarter can be compared better. The yearly 'leap day' on 31 December is a holiday that has nothing to do with a religion or with any culturally determined phenomenon. It is the day the earth starts a new rotation. This applies to all earthlings. It is a bank holiday for the entire world population, a day that could symbolize man's unity. Furthermore there is a great advantage in the countries where Christmas is celebrated. Christmas Day and Boxing day are on a Monday and Tuesday.

The biggest disadvantage is breaking the current pattern of a 7-day week. Saturday 30 December won't be followed by a Sunday and every four years, there won't be a Sunday after Saturday 30 June. This means that a tradition of thousands of years that was introduced by the Babylonians (1800 to 539 BC) would be broken. Since then, the introduction of the 7-day week has survived every calendar reformation. Introducing this calendar would mean great problems for determining religious holidays that are based on a 7-day week. 

Assignment

Write a function worldcalendar to which a number $$d$$ ($$1 \leq d \leq 366$$) of a day of the world calendar should be given. Assume this is a year in the world calendar that has both a world day and a leap day, the total amount of days that year being 366. The days are numbered starting from 1, so that number 1 corresponds with Sunday 1 January. The function should print a string of the format "weekday day month", that represents the day from the world calendar with the number given. Here, also the special weekdays worldday and leapday are taken into consideration. This assignment is made in order to use the structure of the world calendar as efficiently as possible, so that you can keep the code of the function worldcalendar as short as possible.

Example

>>> worldcalendar(1)
'Sunday 1 January'
>>> worldcalendar(32)
'Wednesday 1 February'
>>> worldcalendar(62)
'Friday 1 March'
>>> worldcalendar(92)
'Sunday 1 April'
>>> worldcalendar(182)
'Saturday 30 June'
>>> worldcalendar(183)
'leapday 31 June'
>>> worldcalendar(184)
'Sunday 1 July'
>>> worldcalendar(275)
'Sunday 1 October'
>>> worldcalendar(333)
'Tuesday 28 November'
>>> worldcalendar(365)
'Saturday 30 December'
>>> worldcalendar(366)
'worldday 31 December'