Skip to content

Feature: optional padding #365

@kunyavskiy

Description

@kunyavskiy

Padding class now suggests only strict options. You either have NONE or ZERO or SPACE. Same for formating and parsing.

It looks like a common usecase to have a flexible parser but strict formatted.

This can be implemented now as

alternativeParsing({ year(Padding.NONE) }) { year(Padding.ZERO) }

But this is quite verbose and probably suboptimal. I suggest to add Padding.OPTIONAL_ZERO and maybe something else similar. to fix it.

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