mirror of https://github.com/adamdruppe/arsd.git
new convenience func
This commit is contained in:
parent
c21ca0de83
commit
3df61e91ff
|
@ -51,7 +51,7 @@ Document renderTemplate(string templateName, var context = var.emptyObject, var
|
||||||
|
|
||||||
context.dayOfWeek = function string(string s) {
|
context.dayOfWeek = function string(string s) {
|
||||||
import std.datetime;
|
import std.datetime;
|
||||||
return daysOfWeekFullNames[DateTime.fromISOExtString(s).dayOfWeek];
|
return daysOfWeekFullNames[Date.fromISOExtString(s[0 .. 10]).dayOfWeek];
|
||||||
};
|
};
|
||||||
|
|
||||||
context.formatTime = function string(string s) {
|
context.formatTime = function string(string s) {
|
||||||
|
|
Loading…
Reference in New Issue