Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add non-zero padded month of year #26

Open
Janiczek opened this issue Mar 22, 2018 · 2 comments
Open

Add non-zero padded month of year #26

Janiczek opened this issue Mar 22, 2018 · 2 comments

Comments

@Janiczek
Copy link

In the format directives there is one missing: a space-padded (or non-padded) month number (July -> 7 or 7). I'd find that useful :)

@mgold
Copy link
Owner

mgold commented Mar 23, 2018

First, space-padding and no padding are different. Second, is there prior art with format strings for what escape sequence should represent one of those?

@Janiczek
Copy link
Author

Prior art:

But there's Ruby:

-  don't pad a numerical output.
_  use spaces for padding.
0  use zeros for padding.
^  upcase the result string.
#  change case.
:  use colons for %z.

I understand there's a difference in space padding and no padding, but in HTML context that usually doesn't matter (unless you do white-space: pre or something similar). I'm OK with any of the two options, but would probably use non-padded more often.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants