mirror of
https://github.com/samsonjs/strftime.git
synced 2026-03-25 09:05:48 +00:00
fix a bug with ordinal localization fallback
This commit is contained in:
parent
e571efe7bb
commit
1e41e85146
1 changed files with 6 additions and 1 deletions
|
|
@ -621,7 +621,12 @@
|
|||
// Try to use an ordinal suffix from the locale, but fall back to using the old
|
||||
// function for compatibility with old locales that lack them.
|
||||
var day = date.getDate();
|
||||
resultString += String(day) + (locale.ordinalSuffixes[day - 1] || ordinal(day));
|
||||
if (locale.ordinalSuffixes) {
|
||||
resultString += String(day) + (locale.ordinalSuffixes[day - 1] || ordinal(day));
|
||||
}
|
||||
else {
|
||||
resultString += String(day) + ordinal(day);
|
||||
}
|
||||
break;
|
||||
|
||||
// 'AM'
|
||||
|
|
|
|||
Loading…
Reference in a new issue