Skip to content

Commit

Permalink
Use replace() instead of trim() for IE support
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Earnshaw committed Jun 22, 2015
1 parent eec2008 commit 8f67710
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/Intl.complete.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/Intl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/Intl.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/Intl.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/cldr.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export function createDateTimeFormat(format) {
if (formatObj.pattern.indexOf('{ampm}') > -1) {
formatObj.hour12 = true;
formatObj.pattern12 = formatObj.pattern;
formatObj.pattern = formatObj.pattern.replace('{ampm}', '').trim();
formatObj.pattern = formatObj.pattern.replace('{ampm}', '').replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
}

return formatObj;
Expand Down

0 comments on commit 8f67710

Please sign in to comment.