mirror of
https://github.com/samsonjs/strftime.git
synced 2026-03-25 09:05:48 +00:00
Added lower-case p
This commit is contained in:
parent
f3006f479a
commit
ca6ca41766
1 changed files with 3 additions and 0 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Reference in a new issue