DateMgtAndConditionals

Test Markup expressions and Conditional markup
pmwiki version:

  • pmwiki-2.2.118

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: 20190922T140806
  • Test 3
  • Test 4
 0: 00.00 00.00 config start
 1: 00.00 00.00 config end
 2: 00.03 00.02 MarkupToHTML begin
 3: 00.03 00.02 MarkupToHTML begin
 4: 00.03 00.03 MarkupToHTML end
 5: 00.03 00.03 MarkupToHTML begin
 6: 00.04 00.03 MarkupToHTML end
 7: 00.04 00.04 MarkupToHTML end
 8: 00.05 00.04 MarkupToHTML begin
 9: 00.05 00.05 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
10: 00.06 00.05 ReadApprovedUrls SiteAdmin.ApprovedUrls end
11: 00.06 00.06 MarkupToHTML end
12: 00.06 00.06 MarkupToHTML begin
13: 00.07 00.06 MarkupToHTML end
14: 00.07 00.06 now
Peak memory: 3,125,456 bytes