Difference between revisions of "Template:Previous weekday"

From Geohashing
imported>Tjtrumpet2323
(New page: {{ #ifexpr: ({{ #time: N | {{{1|{{CURRENTTIMESTAMP}} }}} }} = 7) or ({{ #time: N | {{{1|{{CURRENTTIMESTAMP}} }}} }} = 1) | {{#time:Y-m-d|{{{1|{{CURRENTTIMESTAMP}} }}} last Friday}} <!-- is...)
 
imported>Tjtrumpet2323
 
Line 3: Line 3:
 
| {{#time:Y-m-d|{{{1|{{CURRENTTIMESTAMP}} }}} -1 day}} <!-- is a Tues-Sat, use previous day -->
 
| {{#time:Y-m-d|{{{1|{{CURRENTTIMESTAMP}} }}} -1 day}} <!-- is a Tues-Sat, use previous day -->
 
}}<noinclude>
 
}}<noinclude>
 +
== Usage ==
 
For use when calculating what date to use when [[Dow holiday]]s occur.
 
For use when calculating what date to use when [[Dow holiday]]s occur.
 
* If date passed is Tuesday - Friday, returns the previous day.
 
* If date passed is Tuesday - Friday, returns the previous day.
 
* If date passed is Saturday - Monday, returns the previous Friday.
 
* If date passed is Saturday - Monday, returns the previous Friday.
 
</noinclude>
 
</noinclude>

Latest revision as of 16:33, 2 July 2008

2024-04-26

Usage

For use when calculating what date to use when Dow holidays occur.

  • If date passed is Tuesday - Friday, returns the previous day.
  • If date passed is Saturday - Monday, returns the previous Friday.