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}
|
- 2023
- 2024
- 2025
- 11
- Nov
- 09
- 20241109
- 2024-11-09
- 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:)
|
- Nov 09 is today
- Nov 09 and later
-
-
- this month until Nov 09
- this month until Nov 10
- this month until Nov 11
- Nov 09 and before
- Nov 10 and before
- 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:)
|
-
-
-
-
-
-
- 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:)
|
- Not February 2025 (yet or anymore!)
- 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:)
|
-
- Second half of year
|