Permalink
Browse files

update readme to mention %- %_ and %0

  • Loading branch information...
1 parent 71af5de commit e18c7abf88848726f6d8d05f4ec28318b123a80b @samsonjs committed Mar 8, 2013
Showing with 8 additions and 2 deletions.
  1. +8 −2 Readme.md
View
@@ -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
============

0 comments on commit e18c7ab

Please sign in to comment.