Permalink
Browse files

Merge pull request #37 from runejuhl/fix-pgsql-timestamp

is_float is a lot better than not is_integer...
  • Loading branch information...
2 parents a25e0ca + 1b8e85f commit f5b3d31c1ad4abbfa5ba23f19a6f1df985bfa9bc @evanmiller evanmiller committed Aug 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/filter_lib/erlydtl_dateformat.erl
@@ -359,7 +359,7 @@ monthname(12) -> "december";
monthname(_) -> "???".
% Utility functions
-integer_to_list_zerofill(N) when not is_integer(N) ->
+integer_to_list_zerofill(N) when is_float(N) ->
integer_to_list_zerofill(erlang:round(N));
integer_to_list_zerofill(N) when N < 10 ->
lists:flatten(io_lib:format("~2..0B", [N]));

0 comments on commit f5b3d31

Please sign in to comment.