Merge pull request #19 from Abscissa/fixes2

web.d: -d not required, and no warnings
This commit is contained in:
Adam D. Ruppe 2012-06-30 19:52:11 -07:00
commit 183ebe61aa
1 changed files with 7 additions and 9 deletions

16
web.d
View File

@ -1518,7 +1518,7 @@ Form createAutomaticForm(Document document, string action, in Parameter[] parame
} }
count++; count++;
}; }
auto fmt = Element.make("select"); auto fmt = Element.make("select");
fmt.name = "format"; fmt.name = "format";
@ -2161,7 +2161,6 @@ string formatAs(T, R)(T ret, string format, R api = null, JSONValue* returnValue
else goto badType; else goto badType;
+/ +/
goto badType; // FIXME goto badType; // FIXME
break;
case "json": case "json":
assert(returnValue !is null); assert(returnValue !is null);
*returnValue = toJsonValue!(typeof(ret), R)(ret, formatJsonToStringAs, api); *returnValue = toJsonValue!(typeof(ret), R)(ret, formatJsonToStringAs, api);
@ -2664,13 +2663,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;