Skip to content

Can hms objects be comapred with strings? #108

@yutannihilation

Description

@yutannihilation

I feel the result of the comparison with strings is a bit cryptic...

x <- readr::parse_time(c("19:00:00", "20:00:00", "21:00:00", "30:00:00"))

# why...
x > "20:00:00"
#> [1]  TRUE  TRUE  TRUE FALSE

# expected
x > hms::parse_hms("20:00:00")
#> [1] FALSE FALSE  TRUE  TRUE

Created on 2022-07-02 by the reprex package (v2.0.1)

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