Template:Date serial: Difference between revisions

From MicrasWiki
Jump to navigationJump to search
Testing 1,2
No edit summary
Line 15: Line 15:
       <!--Days so far this year:-->
       <!--Days so far this year:-->
   
   
         + {{#time: z |{{{day|{{CURRENTDAY}}}}} {{{month|{{{CURRENTMONTH}}}}} {{{year|{{{CURRENTYEAR}}}}}
         + {{#time: z |{{{day|{{CURRENTDAY}}}}} {{{month|{{CURRENTMONTHNAME}}}}} {{{year|{{CURRENTYEAR}}}}}
          }}
        - {{ #ifexpr:    <!-- if leap year  -->
                    ({{{year|{{CURRENTYEAR}}}}} / 4) = ({{{year|{{CURRENTYEAR}}}}} / 4 round 0)          <!--If divisible by 4-->
                      and ({{{year|{{CURRENTYEAR}}}}} / 100 != {{{year|{{CURRENTYEAR}}}}} / 100 round 0)  <!--and not by 100-->
                  | 1 | 2
          }}
        + {{ #ifexpr: <!--400 year exception-->
                ({{{year|{{CURRENTYEAR}}}}} / 400) = ({{{year|{{CURRENTYEAR}}}}} / 400 round 0)
                  | 1 | 0
           }}  
           }}  
}}
}}

Revision as of 06:59, 14 July 2021

This template gives the Gregorian serial day. This is the numbers of days since 1 A.D. 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:

{{Date serial|day = |month = |year = }}

Today's Date is

739658