Template:Gregorian serial date

From Iwe

Revision as of 07:23, 8 October 2012 by IWEWrestling2012 (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

This template gives the Gregorian serial day. This is the numbers of days from the start of 1 A.D. (Monday, 1 Jan 1 = 1). (In the Gregorian Calendar there is no year 0) This template should handle all leap year exceptions including the 100 and 400 year rule. By default this template gives the serial for today. To find the serial for another date fill in the date into this code: {{Gregorian serial date|month = |day = |year = }}

Today's date is {{#expr:

       + ((2025 - 1) * 365)
       + (((2025 - 1) - ((2025 - 1) mod 4)) / 4)     
       - (((2025 - 1) - ((2025 - 1) mod 100)) / 100) 
       + (((2025 - 1) - ((2025 - 1) mod 400)) / 400) 


       + {{ #ifexpr:     
                    (01 - 1) < 8 
                    | ( (01 - 1) * 30.5 round 0) 
                    | ( (01 - 1) * 30.5 + 0.9 round 0 ) 
         }} 
       - {{ #ifexpr: (01 <= 2) | 0 |  
            {{ #ifexpr:    
                    (2025 / 4) = (2025 / 4 round 0)          
                     and (2025 / 100 != 2025 / 100 round 0)  
               | 1 | 2 
            }}
         }}
       + {{ #ifexpr: (01 <= 2) | 0 |
            {{ #ifexpr: 
                    (2025 / 400) = (2025 / 400 round 0) 
               | 1 | 0 
            }}
         }} 
       + 15
}}{{#ifexpr: 2025 < 1 |
       _ERROR - Can not handle dates before January 1, 1 A.D.
  }}.
  • {{gsd|year=1|month=1|day=1}} gives This template gives the Gregorian serial day. This is the numbers of days from the start of 1 A.D. (Monday, 1 Jan 1 = 1). (In the Gregorian Calendar there is no year 0) This template should handle all leap year exceptions including the 100 and 400 year rule. By default this template gives the serial for today. To find the serial for another date fill in the date into this code: {{Age in days|month = |day = |year = }}

Today's date is 011501.

  • {{gsd|year=1|month=1|day=1}} gives Template loop detected: Template:Gsd
  • {{gsd|year=2000|month=12|day=31}} gives Template loop detected: Template:Gsd (5 times the number of days of a cycle, 146,097)
  • {{gsd|year=1985|month=1|day=1}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1985|month=4|day=12}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1981|month=8|day=12}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1953|month=10|day=2}} gives Template loop detected: Template:Gsd
  • {{gsd|year=2000|month=12|day=31}} gives This template gives the Gregorian serial day. This is the numbers of days from the start of 1 A.D. (Monday, 1 Jan 1 = 1). (In the Gregorian Calendar there is no year 0) This template should handle all leap year exceptions including the 100 and 400 year rule. By default this template gives the serial for today. To find the serial for another date fill in the date into this code: {{Age in days|month = |day = |year = }}

Today's date is 011501.

  • {{gsd|year=1|month=1|day=1}} gives Template loop detected: Template:Gsd
  • {{gsd|year=2000|month=12|day=31}} gives Template loop detected: Template:Gsd (5 times the number of days of a cycle, 146,097)
  • {{gsd|year=1985|month=1|day=1}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1985|month=4|day=12}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1981|month=8|day=12}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1953|month=10|day=2}} gives Template loop detected: Template:Gsd (5 times the number of days of a cycle, 146,097)
  • {{gsd|year=1985|month=1|day=1}} gives This template gives the Gregorian serial day. This is the numbers of days from the start of 1 A.D. (Monday, 1 Jan 1 = 1). (In the Gregorian Calendar there is no year 0) This template should handle all leap year exceptions including the 100 and 400 year rule. By default this template gives the serial for today. To find the serial for another date fill in the date into this code: {{Age in days|month = |day = |year = }}

Today's date is 011501.

  • {{gsd|year=1|month=1|day=1}} gives Template loop detected: Template:Gsd
  • {{gsd|year=2000|month=12|day=31}} gives Template loop detected: Template:Gsd (5 times the number of days of a cycle, 146,097)
  • {{gsd|year=1985|month=1|day=1}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1985|month=4|day=12}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1981|month=8|day=12}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1953|month=10|day=2}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1985|month=4|day=12}} gives This template gives the Gregorian serial day. This is the numbers of days from the start of 1 A.D. (Monday, 1 Jan 1 = 1). (In the Gregorian Calendar there is no year 0) This template should handle all leap year exceptions including the 100 and 400 year rule. By default this template gives the serial for today. To find the serial for another date fill in the date into this code: {{Age in days|month = |day = |year = }}

Today's date is 011501.

  • {{gsd|year=1|month=1|day=1}} gives Template loop detected: Template:Gsd
  • {{gsd|year=2000|month=12|day=31}} gives Template loop detected: Template:Gsd (5 times the number of days of a cycle, 146,097)
  • {{gsd|year=1985|month=1|day=1}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1985|month=4|day=12}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1981|month=8|day=12}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1953|month=10|day=2}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1981|month=8|day=12}} gives This template gives the Gregorian serial day. This is the numbers of days from the start of 1 A.D. (Monday, 1 Jan 1 = 1). (In the Gregorian Calendar there is no year 0) This template should handle all leap year exceptions including the 100 and 400 year rule. By default this template gives the serial for today. To find the serial for another date fill in the date into this code: {{Age in days|month = |day = |year = }}

Today's date is 011501.

  • {{gsd|year=1|month=1|day=1}} gives Template loop detected: Template:Gsd
  • {{gsd|year=2000|month=12|day=31}} gives Template loop detected: Template:Gsd (5 times the number of days of a cycle, 146,097)
  • {{gsd|year=1985|month=1|day=1}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1985|month=4|day=12}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1981|month=8|day=12}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1953|month=10|day=2}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1953|month=10|day=2}} gives This template gives the Gregorian serial day. This is the numbers of days from the start of 1 A.D. (Monday, 1 Jan 1 = 1). (In the Gregorian Calendar there is no year 0) This template should handle all leap year exceptions including the 100 and 400 year rule. By default this template gives the serial for today. To find the serial for another date fill in the date into this code: {{Age in days|month = |day = |year = }}

Today's date is 011501.

  • {{gsd|year=1|month=1|day=1}} gives Template loop detected: Template:Gsd
  • {{gsd|year=2000|month=12|day=31}} gives Template loop detected: Template:Gsd (5 times the number of days of a cycle, 146,097)
  • {{gsd|year=1985|month=1|day=1}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1985|month=4|day=12}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1981|month=8|day=12}} gives Template loop detected: Template:Gsd
  • {{gsd|year=1953|month=10|day=2}} gives Template loop detected: Template:Gsd
Personal tools