date-format
date-format copied to clipboard
format is misscalculating day?
Hey, I'm trying to convert some time in seconds to string using format
. My current approach is working but its showing the wrong amount of days.
DateFormat.format
[ DateFormat.dayOfYearNumber
, DateFormat.text "D "
, DateFormat.hourMilitaryNumber
, DateFormat.text "H "
, DateFormat.minuteNumber
, DateFormat.text "M "
, DateFormat.secondNumber
, DateFormat.text "S"
]
utc
(Time.millisToPosix (someTimeInSeconds * 1000))
When I try this with someTimeInSeconds = 807627
. It will return 10 days instead of 9.