From e18c7abf88848726f6d8d05f4ec28318b123a80b Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Thu, 7 Mar 2013 19:48:50 -0800 Subject: [PATCH] update readme to mention %- %_ and %0 --- Readme.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index a6d3673..aacd130 100644 --- a/Readme.md +++ b/Readme.md @@ -93,8 +93,14 @@ e.g. `%q` becomes `q`. Use `%%` to get a literal `%` sign. of UTC and a minus sign for those west of UTC, hours and minutes follow each padded to 2 digits and with no delimiter between them -For more detail see `man 3 strftime` as the format specifiers should behave identically. If behaviour differs please [file a bug](https://github.com/samsonjs/strftime/issues/new). +For more detail see `man 3 strftime` as the format specifiers should behave +identically. If behaviour differs please [file a bug](https://github.com/samsonjs/strftime/issues/new). +Any specifier can be modified with `-`, `_`, or `0` as well, as in Ruby. +Using `%-` will omit any leading zeroes or spaces, `%_` will force spaces +for padding instead of the default, and `%0` will force zeroes for padding. +There's some redundancy here as `%-d` and `%e` have the same result, but it +solves some awkwardness with formats like `%l`. Contributors ============