Skip to content

format is misscalculating day? #26

@farebord

Description

@farebord

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions