Add ability to now macro to return same UTC string used in date fields (#2884)

* Add ability to now macro to return same UTC string used in the modified and created fields.

* Revert "Add ability to now macro to return same UTC string used in the modified and created fields."

This reverts commit 7b6ad7db4a.

* Mods to formatDateString to adjust displayed date to UTC for [UTC]
format. Corresponding doc changes, and optimization for special
case.
This commit is contained in:
Marxsal
2017-07-01 10:09:16 -07:00
committed by Jeremy Ruston
parent 1919f0e9b0
commit 4db950cc45
3 changed files with 24 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
created: 20140418142957325
modified: 20140912145809035
modified: 20170630223008226
tags: Features
title: DateFormat
type: text/vnd.tiddlywiki
@@ -30,10 +30,13 @@ The ViewWidget accepts a `template` attribute that allows the format of date val
|`0mm` |Minutes with leading zero |
|`ss` |Seconds |
|`0ss` |Seconds with leading zero |
|`XXX` |Milliseconds |
|`0XXX` |Milliseconds with leading zero |
|`am` or `pm` |Lower case AM/PM indicator |
|`AM` or `PM` |Upper case AM/PM indicator |
|`TZD` |Timezone offset |
|`\x` |Used to escape a character that would otherwise have special meaning |
|`[UTC]`|Time-shift the represented date to UTC. Must be at very start of format string|
Note that other text is passed through unchanged, allowing commas, colons or other separators to be used.