From 3df61e91ff8935c015503e9926ac5c8a971c1ee5 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Tue, 9 Jul 2019 09:24:36 -0400 Subject: [PATCH] new convenience func --- webtemplate.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webtemplate.d b/webtemplate.d index cfb9d36..6021523 100644 --- a/webtemplate.d +++ b/webtemplate.d @@ -51,7 +51,7 @@ Document renderTemplate(string templateName, var context = var.emptyObject, var context.dayOfWeek = function string(string s) { import std.datetime; - return daysOfWeekFullNames[DateTime.fromISOExtString(s).dayOfWeek]; + return daysOfWeekFullNames[Date.fromISOExtString(s[0 .. 10]).dayOfWeek]; }; context.formatTime = function string(string s) {