DateMgtAndConditionals

Test Markup expressions and Conditional markup
pmwiki version:

  • pmwiki-2.3.33

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: 20240519T180129
  • Test 3
  • Test 4
 0: 00.00 00.00 config start
 1: 00.01 00.01 config end
 2: 00.25 00.20 MarkupToHTML begin
 3: 00.25 00.20 MarkupToHTML begin
 4: 00.27 00.21 MarkupToHTML end
 5: 00.27 00.21 MarkupToHTML begin
 6: 00.27 00.21 MarkupToHTML end
 7: 00.29 00.22 MarkupToHTML end
 8: 00.30 00.22 MarkupToHTML begin
 9: 00.31 00.23 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
10: 00.32 00.23 ReadApprovedUrls SiteAdmin.ApprovedUrls end
11: 00.33 00.23 MarkupToHTML end
12: 00.33 00.23 MarkupToHTML begin
13: 00.33 00.24 MarkupToHTML end
14: 00.33 00.24 now
Peak memory: 3,721,520 bytes