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. 2021
  2. 2022
  3. 2023
  4. 08
  5. Aug
  6. 18
  7. 20220818
  8. 2022-08-18
  9. 19
  10. 20
#(: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. Aug 18 is today
  2. Aug 18 and later
  3. this month until Aug 18
  4. this month until Aug 19
  5. this month until Aug 20
  6. Aug 18 and before
  7. Aug 19 and before
  8. Aug 20 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 2023 (yet or anymore!)
  2. Not February 2023 (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.11 00.11 MarkupToHTML begin
 3: 00.11 00.11 MarkupToHTML begin
 4: 00.12 00.12 MarkupToHTML end
 5: 00.12 00.12 MarkupToHTML begin
 6: 00.13 00.12 MarkupToHTML end
 7: 00.13 00.12 MarkupToHTML begin
 8: 00.13 00.12 MarkupToHTML end
 9: 00.13 00.12 MarkupToHTML begin
10: 00.13 00.13 MarkupToHTML end
11: 00.13 00.13 MarkupToHTML begin
12: 00.13 00.13 MarkupToHTML end
13: 00.14 00.13 MarkupToHTML end
14: 00.14 00.13 MarkupToHTML begin
15: 00.15 00.14 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
16: 00.15 00.14 ReadApprovedUrls SiteAdmin.ApprovedUrls end
17: 00.16 00.15 MarkupToHTML end
18: 00.16 00.15 MarkupToHTML begin
19: 00.16 00.15 MarkupToHTML end
20: 00.16 00.15 now
Peak memory: 3,423,592 bytes