Skip to content

Add padding size to Pad::Zero or Pad::Space #1663

Open
@BigPapa314

Description

@BigPapa314

The uu_date command in coreutils uses chrono to parse the format string. In #7334 there is a report that it is needed to add the amount of padding to the format string.

current behavior

let format_items = StrftimeItems::new("+%03d"); will yield Item::Error.

expected behavior

let format_items = StrftimeItems::new("+%03d"); should yield Item::Numeric(Numeric::Day, Pad::Zero(3)).
And in format_numeric() replace the hard coded 1 char padding to the value in Pad::Space or Pad::Zero.

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