Skip to content

Parse without seconds #111

@gregorp

Description

@gregorp

Not sure if this is a dupe of #30, but I'd expect as_hms to work without seconds, or at least give an intelligible warning or error.

hms::as_hms("08:00")
Error in `abort_lossy_cast()`:
! Lossy cast from <character> to <hms> at position(s) 1
Run `rlang::last_error()` to see where the error occurred.

Inspired by this Stack Overflow question where a user without seconds couldn't figure out what was going wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions