We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 158e590 + a7b63b8 commit 0659f6bCopy full SHA for 0659f6b
src/Data/Formatter/DateTime.purs
@@ -186,9 +186,10 @@ formatF cb dt@(DT.DateTime d t) = case _ of
186
Hours24 a →
187
show (fromEnum $ T.hour t) <> cb a
188
Hours12 a →
189
- show ((fromEnum $ T.hour t) `mod` 12) <> cb a
+ let fix12 h = if h == 0 then 12 else h
190
+ in show (fix12 $ (fromEnum $ T.hour t) `mod` 12) <> cb a
191
Meridiem a →
- (if (fromEnum $ T.hour t) > 12 then "PM" else "AM") <> cb a
192
+ (if (fromEnum $ T.hour t) >= 12 then "PM" else "AM") <> cb a
193
Minutes a →
194
show (fromEnum $ T.minute t) <> cb a
195
Seconds a →
0 commit comments