Skip to content

Parse negative special durations as negative durations #143

@gabizou

Description

@gabizou

Simply put, if you parse strfmt.ParseDuration("-1h"), you will correctly get minus 1 hour. However, when using the "enhanced" durations like d/w, you will not get a negative duration, but a positive one. So strfmt.ParseDuration("-1d") will result in a positive day duration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions