Permalink
Browse files

is_float is a lot better than not is_integer...

  • Loading branch information...
1 parent 66936d8 commit 1b8e85f2e349a988eeeedccf73b20799a4c75ff5 @runejuhl runejuhl committed Aug 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/filter_lib/erlydtl_dateformat.erl
View
2 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 1b8e85f

Please sign in to comment.