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. 11
  5. Nov
  6. 09
  7. 20241109
  8. 2024-11-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. Nov 09 is today
  2. Nov 09 and later
  3. this month until Nov 09
  4. this month until Nov 10
  5. this month until Nov 11
  6. Nov 09 and before
  7. Nov 10 and before
  8. Nov 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 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. Second half of year
 0: 00.00 00.00 config start
 1: 00.01 00.01 config end
 2: 00.21 00.20 MarkupToHTML begin
 3: 00.21 00.20 MarkupToHTML begin
 4: 00.22 00.21 MarkupToHTML end
 5: 00.22 00.21 MarkupToHTML begin
 6: 00.23 00.22 MarkupToHTML end
 7: 00.23 00.22 MarkupToHTML begin
 8: 00.23 00.22 MarkupToHTML end
 9: 00.23 00.22 MarkupToHTML begin
10: 00.23 00.22 MarkupToHTML end
11: 00.23 00.22 MarkupToHTML begin
12: 00.23 00.22 MarkupToHTML end
13: 00.24 00.23 MarkupToHTML end
14: 00.25 00.23 MarkupToHTML begin
15: 00.25 00.24 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
16: 00.26 00.24 ReadApprovedUrls SiteAdmin.ApprovedUrls end
17: 00.26 00.25 MarkupToHTML end
18: 00.26 00.25 MarkupToHTML begin
19: 00.27 00.25 MarkupToHTML end
20: 00.27 00.25 now
Peak memory: 3,772,136 bytes