Template talk:Day

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Fix?[edit]

Wouldn't it be much easier to use a fixed year in the template? The subtemplate Template:Day/Totaldays only has the purpose to remove the error induced by using the current year.

This code should be easier:

[[{{FULLPAGENAME}}]] is the {{ordinal|{{#expr: {{#time:z|{{{1|{{PAGENAME}}}}} 2005}} + 1 }}}} day of the year {{#ifexpr: {{#time:z|{{{1|{{PAGENAME}}}}} 2004}} < 59 |<!-- then: -->|<!-- else: -->({{ordinal|{{#expr: {{#time:z|{{{1|{{PAGENAME}}}}} 2004}} + 1 }}}} in [[leap year]]s)}} in the [[Gregorian calendar]]. There {{#ifeq:{{{1|{{PAGENAME}}}}}|December 30|is 1 day remaining until the end of the year.|are {{#expr:365 - {{#time:z|{{{1|{{PAGENAME}}}}} 2005}} - 1}} days remaining until the end of the year{{#ifexpr: {{#time:z|{{{1|{{PAGENAME}}}}} 2004}} < 59 |<!-- then: --> ({{#expr:366 - {{#time:z|{{{1|{{PAGENAME}}}}} 2004}} - 1}} in [[leap year]]s)|<!-- else: -->}}.}}

February 15 is the 46th day of the year in the Gregorian calendar. There are 319 days remaining until the end of the year (320 in leap years).

October 11 is the 284th day of the year (285th in leap years) in the Gregorian calendar. There are 81 days remaining until the end of the year.

--Slomox (talk) 18:16, 10 January 2009 (UTC)[reply]

Then I will try. We can still revert, if there are flaws. --Slomox (talk) 20:24, 10 January 2009 (UTC)[reply]
I see no difference, I tested dates before and after February 29. Template:Day/Totaldays is obsolete now, I will delete it. --Slomox (talk) 20:27, 10 January 2009 (UTC)[reply]