DateMgtAndConditionals

Test Markup expressions and Conditional markup
pmwiki version:

  • pmwiki-2.3.8

Formatting ISO dates with ftime works perfectly:

* Year: {(ftime %Y 20071022T115732)}
* Month: {(ftime %m 20071022T115732)}
* Day: {(ftime %d 20071022T115732)}
* Hours: {(ftime %H 20071022T115732)}
* Minutes: {(ftime %M 20071022T115732)}
* Seconds: {(ftime %S 20071022T115732)}
* Week: {(ftime %W 20071022T115732)}
  • Year: 2007
  • Month: 10
  • Day: 22
  • Hours: 11
  • Minutes: 57
  • Seconds: 32
  • Week: 43

Conditionals:

* Now: {(ftime now %Y%m%d)}T{(ftime now %H%M%S)}
(:if date 20071022T1157 20071022T1158:)* Test 1(:ifend:)
(:if date 20071022T1158 20071022T1157:)* Test 2(:ifend:)
(:if date 20071022T0501..:)* Test 3(:ifend:)
(:if date 20071022T1200..:)* Test 4(:ifend:)
(:if date 20071022T0501..20071022T0505:)* Test 5(:ifend:)
  • Now: 20220816T012234
  • Test 3
  • Test 4
 0: 00.00 00.00 config start
 1: 00.01 00.01 config end
 2: 00.12 00.11 MarkupToHTML begin
 3: 00.12 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.13 MarkupToHTML end
 8: 00.14 00.13 MarkupToHTML begin
 9: 00.14 00.14 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
10: 00.15 00.14 ReadApprovedUrls SiteAdmin.ApprovedUrls end
11: 00.15 00.15 MarkupToHTML end
12: 00.15 00.15 MarkupToHTML begin
13: 00.16 00.15 MarkupToHTML end
14: 00.16 00.15 now
Peak memory: 3,399,416 bytes