Skip to content

Hyphenated formats for non-zero padded numbers #13

@Evidlo

Description

@Evidlo

Some strftime implementations support non-zero padded numbers.

For example, in Python

>>> from datetime import datetime
>>> datetime.strftime(datetime.now(), '%-d')
'1'

This is documented in glibc's strftime.

Windows has its own set of codes which use # instead of -:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l?redirectedfrom=MSDN&view=vs-2019

Another reference: https://strftime.org/#platforms

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