webmcp
changeset 109:db7ad8e4f78b
Print 12:xx a.m., instead of 00:xx a.m.
author | jbe |
---|---|
date | Sun Nov 04 18:51:32 2012 +0100 (2012-11-04) |
parents | 08c107cc4fce |
children | 0c4841af07a5 |
files | framework/env/format/time.lua |
line diff
1.1 --- a/framework/env/format/time.lua Sun Nov 04 18:46:29 2012 +0100 1.2 +++ b/framework/env/format/time.lua Sun Nov 04 18:51:32 2012 +0100 1.3 @@ -45,6 +45,9 @@ 1.4 if am_pm and hour > 12 then 1.5 hour = hour - 12 1.6 end 1.7 + if am_pm and hour == 0 then 1.8 + hour = 12 1.9 + end 1.10 result = string.gsub(result, "HH", function() 1.11 return format.decimal(hour, { digits = 2 }) 1.12 end)