diff --git a/calexium_lib/web/CXM_multihost_http_server.anubis b/calexium_lib/web/CXM_multihost_http_server.anubis index b3f69a5..1d874d0 100644 --- a/calexium_lib/web/CXM_multihost_http_server.anubis +++ b/calexium_lib/web/CXM_multihost_http_server.anubis @@ -883,23 +883,6 @@ define Result(Error,String) - *** [2.6] Padding integers with zeros. - - 'zero_pad_2' transforms an integer (which is assumed to be between 0 and 99) into a - string with exactly two digits. This is used for formating days, hours, minutes and - seconds. - -define String - zero_pad_2 - ( - Int32 n - ) = - with s = integer_to_string(n), - if length(s) < 2 - then "0"+s - else s. - - @@ -987,9 +970,9 @@ define String = if convert_time(now) is date_and_time(y,m,d,h,_,_,_,_,_) then integer_to_string(y)+"_"+ - zero_pad_2(m)+"_"+ - zero_pad_2(d)+"_"+ - zero_pad_2(h). + zero_pad_n(2,m)+"_"+ + zero_pad_n(2,d)+"_"+ + zero_pad_n(2,h). @@ -1094,8 +1077,8 @@ define String ) = with dt = convert_time(now), if remote_IP_address_and_port(client_connection) is (addr,port) then - integer_to_string(year(dt))+"/"+format_month(month(dt))+"/"+zero_pad_2(day(dt))+" "+ - zero_pad_2(hour(dt))+":"+zero_pad_2(minute(dt))+":"+zero_pad_2(second(dt))+ + integer_to_string(year(dt))+"/"+format_month(month(dt))+"/"+zero_pad_n(2,day(dt))+" "+ + zero_pad_n(2,hour(dt))+":"+zero_pad_n(2,minute(dt))+":"+zero_pad_n(2,second(dt))+ " from "+ip_addr_to_string(addr)+ ": "+uri(request_line)+"\n"+ show_format(desc,headers)+ -- libgit2 0.21.4