Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Refactored and fixed a bug when seconds (float or integer) < 10.

  • Loading branch information...
commit 788a0f60e678e6a24ec6d21bc3fd2cd0d9d62307 1 parent e927a3f
@runejuhl runejuhl authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/filter_lib/erlydtl_dateformat.erl
View
6 src/filter_lib/erlydtl_dateformat.erl
@@ -359,12 +359,12 @@ monthname(12) -> "december";
monthname(_) -> "???".
% Utility functions
+integer_to_list_zerofill(N) when not is_integer(N) ->
+ integer_to_list_zerofill(erlang:round(N));
integer_to_list_zerofill(N) when N < 10 ->
lists:flatten(io_lib:format("~2..0B", [N]));
integer_to_list_zerofill(N) when is_integer(N) ->
- integer_to_list(N);
-integer_to_list_zerofill(N) ->
- integer_to_list_zerofill(erlang:round(N)).
+ integer_to_list(N).
ucfirst([First | Rest]) when First >= $a, First =< $z ->
[First-($a-$A) | Rest];
Please sign in to comment.
Something went wrong with that request. Please try again.