Difference between revisions of "Template:JulianWeekday"

From blackwiki
Jump to navigation Jump to search
imported>Verdy p
m
imported>Cydebot
m (Robot - Removing category Templates using ParserFunctions per CFD at Wikipedia:Categories for discussion/Log/2008 August 21.)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>{{#switch:{{#expr:({{{1}}})mod 7}}|0=Monday|1=Tuesday|2=Wednesday|3=Thursday|4=Friday|5=Saturday|6=Sunday|{{{1}}}}}</includeonly><noinclude>{{Template documentation}}
+
{{#switch: {{#expr: ({{{1}}} + 0.5) mod 7}}
 +
|0=Monday
 +
|1=Tuesday
 +
|2=Wednesday
 +
|3=Thursday
 +
|4=Friday
 +
|5=Saturday
 +
|6=Sunday
 +
}}<noinclude>
  
Returns the English name of the day of week for the given julian timestamp.
+
{{JulianWeekday|{{JD}}}}
  
; Syntax<nowiki>:</nowiki>
+
[[Category:Date mathematics templates|JulianWeekday]]
: <tt><nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|</nowiki></tt>''timestamp''<tt><nowiki>}}</nowiki></tt>
 
* The timestamp may be any valid numeric expression that is evaluated and rounded to the nearest integer (noon) before being interpreted as a julian day number.
 
 
 
; Examples<nowiki>:</nowiki>
 
* The current weekday name (UTC time) is <nowiki>{{JulianWeekday|{{JD}}}}</nowiki> = "{{JulianWeekday|{{JD}}}}".
 
* In the next 12 hours it will be <nowiki>{{JulianWeekday|{{JD}}+0.5}}</nowiki> = "{{JulianWeekday|{{JD}}+0.5}}".
 
* In the next 24 hours it will be <nowiki>{{JulianWeekday|{{JD}}+1}}</nowiki> = "{{JulianWeekday|{{JD}}+1}}".
 
 
 
; See also<nowiki>:</nowiki>
 
* [[Template:JD]]
 
 
 
[[Category:Date math]]
 
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
 
 
 
[[fr:Modèle:WEEKDAYNAME]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 17:54, 26 August 2008


Friday