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. 2023
  2. 2024
  3. 2025
  4. 05
  5. May
  6. 22
  7. 20240522
  8. 2024-05-22
  9. 23
  10. 24
#(: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. May 22 is today
  2. May 22 and later
  3. this month until May 22
  4. this month until May 23
  5. this month until May 24
  6. May 22 and before
  7. May 23 and before
  8. May 24 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 2025 (yet or anymore!)
  2. Not February 2025 (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
 0: 00.00 00.00 config start
 1: 00.01 00.01 config end
 2: 00.20 00.20 MarkupToHTML begin
 3: 00.20 00.20 MarkupToHTML begin
 4: 00.21 00.21 MarkupToHTML end
 5: 00.21 00.21 MarkupToHTML begin
 6: 00.22 00.22 MarkupToHTML end
 7: 00.22 00.22 MarkupToHTML begin
 8: 00.22 00.22 MarkupToHTML end
 9: 00.22 00.22 MarkupToHTML begin
10: 00.22 00.22 MarkupToHTML end
11: 00.22 00.22 MarkupToHTML begin
12: 00.22 00.22 MarkupToHTML end
13: 00.23 00.23 MarkupToHTML end
14: 00.23 00.23 MarkupToHTML begin
15: 00.24 00.24 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
16: 00.24 00.24 ReadApprovedUrls SiteAdmin.ApprovedUrls end
17: 00.25 00.25 MarkupToHTML end
18: 00.25 00.25 MarkupToHTML begin
19: 00.25 00.25 MarkupToHTML end
20: 00.25 00.25 now
Peak memory: 3,745,504 bytes