Skip to content

Commit 39816bd

Browse files
authored
Merge pull request #20 from garyb/hour24-padding
Fix `Hours24` to pad to two digits
2 parents 70ac003 + b08cf1a commit 39816bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Data/Formatter/DateTime.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ formatF cb dt@(DT.DateTime d t) = case _ of
209209
DayOfWeek a →
210210
show (fromEnum $ D.weekday d) <> cb a
211211
Hours24 a →
212-
show (fromEnum $ T.hour t) <> cb a
212+
padSingleDigit (fromEnum $ T.hour t) <> cb a
213213
Hours12 a →
214214
let fix12 h = if h == 0 then 12 else h
215215
in (padSingleDigit $ fix12 $ (fromEnum $ T.hour t) `mod` 12) <> cb a

0 commit comments

Comments
 (0)