diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js index d2f60537f..8b608b2b2 100644 --- a/core/modules/utils/utils.js +++ b/core/modules/utils/utils.js @@ -383,6 +383,9 @@ exports.formatDateString = function(date,template) { [/^0WW/, function() { return $tw.utils.pad($tw.utils.getWeek(date)); }], + [/^dddd/, function() { + return [7,1,2,3,4,5,6][date.getDay()]; + }], [/^ddd/, function() { return $tw.language.getString("Date/Short/Day/" + date.getDay()); }], diff --git a/editions/tw5.com/tiddlers/features/DateFormat.tid b/editions/tw5.com/tiddlers/features/DateFormat.tid index d0426565e..692ec5b62 100644 --- a/editions/tw5.com/tiddlers/features/DateFormat.tid +++ b/editions/tw5.com/tiddlers/features/DateFormat.tid @@ -1,5 +1,5 @@ created: 20140418142957325 -modified: 20201201154521138 +modified: 20210912115121622 tags: Features title: DateFormat type: text/vnd.tiddlywiki @@ -9,6 +9,7 @@ When used to display date values (with the `format` attribute set to ''date''), |!Token |!Substituted Value | |`DDD` |Day of week in full (eg, "Monday") | |`ddd` |Short day of week (eg, "Mon") | +|`dddd` |<<.from-version "5.2.0">> Weekday number from 1 through 7, beginning with Monday and ending with Sunday | |`DD` |Day of month | |`0DD` |Adds a leading zero | |`DDth` |Adds a suffix |