diff --git a/lib/index.js b/lib/index.js index d120778..0cd5f50 100644 --- a/lib/index.js +++ b/lib/index.js @@ -39,6 +39,8 @@ , shortMonths: words('Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec') , AM: 'AM' , PM: 'PM' + , am: 'am' + , pm: 'pm' } function strftime(fmt, d, locale) { @@ -92,6 +94,7 @@ case 'm': return pad(d.getMonth() + 1); case 'n': return '\n'; case 'p': return d.getHours() < 12 ? locale.AM : locale.PM; + case 'P': return d.getHours() < 12 ? locale.am : locale.pm; case 'R': return _strftime(locale.formats.R || '%H:%M', d, locale); case 'r': return _strftime(locale.formats.r || '%I:%M:%S %p', d, locale); case 'S': return pad(d.getSeconds());