Skip to content

Commit 7d6d22c

Browse files
committed
Add padMonth option to documentation
1 parent 8b3e444 commit 7d6d22c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ template.render(new Date());
2424

2525
* `MMMM` - Full Month (September)
2626
* `MM` - Partial Month (Sep)
27-
* `Mo` - Numeric Month (9)
27+
* `Mo` - Numeric Month (9) <sup>1</sup>
2828
* `YYYY` - Full Year (1992)
2929
* `YY` - Partial Year (92)
3030
* `dddd` - Day of the Week (Monday)
@@ -35,6 +35,12 @@ template.render(new Date());
3535
* `mm` - Minutes (zero padded)
3636
* `ss` - Seconds (zero padded)
3737
* `a` - AM/PM
38+
39+
<sup>1</sup> - you get padded months (`09` instead of `9`) by passing in the `padMonth` option.
40+
41+
```js
42+
const template = tinytime('{Mo}', { padMonth: true })
43+
```
3844

3945

4046
## Efficiency

0 commit comments

Comments
 (0)