Recent Changes - Search:

PmWiki

pmwiki.org

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

IfDate

Test if date conditional markup

#(:lastyear:{(ftime %Y when="last year")}:) {$:lastyear}
#(:year:{(ftime %Y)}:) {$:year}
#(:nextyear:{(ftime fmt=%Y when="next year")}:) {$:nextyear}
#(:month:{(ftime %m)}:) {$:month}
#(:monthlit:{(ftime %b)}:) {$:monthlit}
#(:day:{(ftime %d)}:) {$:day}
#(:today:{(ftime fmt="%Y%m%d")}:) {$:today}
#(:tooday:{(ftime %F)}:) {$:tooday}
#(:tomorrow:{(ftime %d when="tomorrow")}:) {$:tomorrow}
#(:nextday:{(ftime %d when="2 days")}:) {$:nextday}
  1. 2011
  2. 2012
  3. 2013
  4. 02
  5. Feb
  6. 09
  7. 20120209
  8. 2012-02-09
  9. 10
  10. 11
#(:if date {$:tooday}:) {$:monthlit} {$:day} is today (:ifend:)
#(:if date {$:today}..:) {$:monthlit} {$:day} and later (:ifend:)
#(:if date {(ftime week %F when=tomorrow)}..:) {$:monthlit} {$:tomorrow}
and later (:ifend:)
#(:if date {(ftime week %F when="2 days")}..:) {$:monthlit} {$:nextday}
and later (:ifend:)
#(:if date {$:year}/{$:month}/01..{$:year}/{$:month}/{$:day}:) this month
until {$:monthlit} {$:day} (:ifend:)
#(:if date {$:year}/{$:month}/01..{$:year}/{$:month}/{$:tomorrow}:) this
month until {$:monthlit} {$:tomorrow} (:ifend:)
#(:if date {$:year}/{$:month}/01..{$:year}/{$:month}/{$:nextday}:) this
month until {$:monthlit} {$:nextday} (:ifend:)
#(:if date ..{$:year}.{$:month}.{$:day}:) {$:monthlit} {$:day} and before
(:ifend:)
#(:if date ..{$:year}.{$:month}.{$:tomorrow}:) {$:monthlit} {$:tomorrow}
and before (:ifend:)
#(:if date ..{$:year}.{$:month}.{$:nextday}:) {$:monthlit} {$:nextday} and
before (:ifend:)
  1. Feb 09 is today
  2. Feb 09 and later
  3. this month until Feb 09
  4. this month until Feb 10
  5. this month until Feb 11
  6. Feb 09 and before
  7. Feb 10 and before
  8. Feb 11 and before
#(:if date ..{$:year}:12:31:) anytime up to the end of {$:year} (:ifend:)
#(:if date ..y{$:lastyear}m12d31:) anytime up to last year ({$:lastyear})
(:ifend:)
#(:if date {$:nextyear}0101..{$:nextyear}1231:) anytime next year
({$:nextyear}) (:ifend:)
#(:if date m{$:monthlit}:) {$:monthlit} (:ifend:)
#(:if date m{$:monthlit}..m12:) {$:monthlit} to december (:ifend:)
#(:if date m12d25:) christmas day (:ifend:)
#(:if ! date m12d25:) not xmas day (:ifend:)
#(:if date y{$:year}:) year of {$:year} (:ifend:)
  1. not xmas day
#(:if !date {$:nextyear}-02-01..{$:nextyear}-02-28:) Not February
{$:nextyear} (yet or anymore!) (:ifend:)
#(:if !date y{$:nextyear}m2:) Not February {$:nextyear} (yet or anymore!)
(:ifend:)
#(:if date {$:nextyear}-03-01..{$:nextyear}-03-31:) March {$:nextyear}
(:ifend:)
  1. Not February 2013 (yet or anymore!)
  2. Not February 2013 (yet or anymore!)
#(:if date {$:year}-01-01..{$:year}-06-30:)First half of year (:ifend:)
#(:if date {$:year}-07-01..{$:year}-12-31:)Second half of year (:ifend:)
  1. First half of year
Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 12:03 PM
 0: 00.00 00.00 config start
 1: 00.01 00.00 config end
 2: 00.05 00.05 MarkupToHTML begin
 3: 00.06 00.05 MarkupToHTML begin
 4: 00.08 00.07 MarkupToHTML end
 5: 00.08 00.07 MarkupToHTML begin
 6: 00.09 00.08 MarkupToHTML end
 7: 00.09 00.08 MarkupToHTML begin
 8: 00.10 00.09 MarkupToHTML end
 9: 00.10 00.09 MarkupToHTML begin
10: 00.11 00.10 MarkupToHTML end
11: 00.11 00.10 MarkupToHTML begin
12: 00.11 00.10 MarkupToHTML end
13: 00.13 00.12 MarkupToHTML end
14: 00.14 00.12 MarkupToHTML begin
15: 00.16 00.15 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
16: 00.17 00.16 ReadApprovedUrls SiteAdmin.ApprovedUrls end
17: 00.19 00.17 MarkupToHTML end
18: 00.19 00.18 MarkupToHTML begin
19: 00.20 00.19 MarkupToHTML end
20: 00.21 00.19 now