|
|
Regel 1: |
Regel 1: |
| <noinclude>{{Sjablooninfo|1=Telt het aantal dagen sinds 1 januari 1 volgende de [[Gregoriaanse kalender]].
| | #Doorverwijzing[[Sjabloon:Gregorian serial date]] |
| | |
| Zodoende is vandaag ({{LOCALDAY}} {{LOCALMONTHNAME}} {{LOCALYEAR}}) </noinclude>{{#expr:
| |
| <!--Days from all years past:-->
| |
| | |
| + (({{{jaar|{{CURRENTYEAR}}}}} - 1) * 365)
| |
| + ((({{{jaar|{{CURRENTYEAR}}}}} - 1) - (({{{jaar|{{CURRENTYEAR}}}}} - 1) mod 4)) / 4) <!--add a day for every leap-->
| |
| - ((({{{jaar|{{CURRENTYEAR}}}}} - 1) - (({{{jaar|{{CURRENTYEAR}}}}} - 1) mod 100)) / 100) <!--subtract 100 year exception-->
| |
| + ((({{{jaar|{{CURRENTYEAR}}}}} - 1) - (({{{jaar|{{CURRENTYEAR}}}}} - 1) mod 400)) / 400) <!--readd 400 year exception-->
| |
| | |
| <!--Days so far this year:-->
| |
|
| |
| + {{ #ifexpr: <!--add days for past months this year--> <!--Gives 1 or 2 extra days because of February-->
| |
| ({{{maand|{{CURRENTMONTH}}}}} - 1) < 8
| |
| | ( ({{{maand|{{CURRENTMONTH}}}}} - 1) * 30.5 round 0)
| |
| | ( ({{{maand|{{CURRENTMONTH}}}}} - 1) * 30.5 + 0.9 round 0 )
| |
| }}
| |
| - {{ #ifexpr: ({{{maand|{{CURRENTMONTH}}}}} <= 2) | 0 |
| |
| {{ #ifexpr: <!-- if leap year -->
| |
| ({{{jaar|{{CURRENTYEAR}}}}} / 4) = ({{{jaar|{{CURRENTYEAR}}}}} / 4 round 0) <!--If divisible by 4-->
| |
| and ({{{jaar|{{CURRENTYEAR}}}}} / 100 != {{{jaar|{{CURRENTYEAR}}}}} / 100 round 0) <!--and not by 100-->
| |
| | 1 | 2
| |
| }}
| |
| }}
| |
| + {{ #ifexpr: ({{{maand|{{CURRENTMONTH}}}}} <= 2) | 0 |
| |
| {{ #ifexpr: <!--400 year exception-->
| |
| ({{{jaar|{{CURRENTYEAR}}}}} / 400) = ({{{jaar|{{CURRENTYEAR}}}}} / 400 round 0)
| |
| | 1 | 0
| |
| }}
| |
| }}
| |
| + {{{dag|{{CURRENTDAY}}}}}
| |
| }}{{#ifexpr: {{{jaar|{{CURRENTYEAR}}}}} < 1 |
| |
| _ERROR - Can not handle dates before January 1, 1 A.D.
| |
| }}<noinclude> dagen na 1 januari 1.
| |
| | |
| | |
| | |
| *<nowiki>{{gdt|jaar=1|maand=1|dag=1}}</nowiki> geeft {{gdt|jaar=1|maand=1|dag=1}}
| |
| *<nowiki>{{gdt|jaar=2000|maand=12|dag=31}}</nowiki> geeft {{gdt|jaar=2000|maand=12|dag=31}}
| |
| *<nowiki>{{gdt|jaar=2012|maand=7|dag=1}}</nowiki> geeft {{gdt|jaar=2012|maand=7|dag=1}}
| |
| }}
| |
| [[Categorie:Sjablonen datum en tijd|Kalender, Gdt]]
| |
| | |
| [[en:Template:Gregorian serial date]] | |
| </noinclude>
| |