mirror of https://github.com/adamdruppe/arsd.git
Works without -d
This commit is contained in:
parent
3649029cf6
commit
34f9cb1de6
13
web.d
13
web.d
|
@ -2664,13 +2664,12 @@ immutable(string[]) weekdayNames = [
|
||||||
// this might be temporary
|
// this might be temporary
|
||||||
struct TemplateFilters {
|
struct TemplateFilters {
|
||||||
string date(string replacement, string[], in Element, string) {
|
string date(string replacement, string[], in Element, string) {
|
||||||
auto date = to!long(replacement);
|
auto dateTicks = to!time_t(replacement);
|
||||||
|
auto date = SysTime( unixTimeToStdTime(dateTicks/1_000) );
|
||||||
import std.date;
|
|
||||||
|
auto day = date.day;
|
||||||
auto day = dateFromTime(date);
|
auto year = date.year;
|
||||||
auto year = yearFromTime(date);
|
auto month = monthNames[date.month];
|
||||||
auto month = monthNames[monthFromTime(date)];
|
|
||||||
replacement = format("%s %d, %d", month, day, year);
|
replacement = format("%s %d, %d", month, day, year);
|
||||||
|
|
||||||
return replacement;
|
return replacement;
|
||||||
|
|
Loading…
Reference in New Issue