Dynamically augment availableFormats#462
Conversation
Dynamically augment availableFormats Fixes globalizejs#271
|
Awesome! All I see for now are some style issues, which I'm going to comment inline. |
There was a problem hiding this comment.
As long as its in a separate commit. Should also enable caching, see, for example, qunitjs/qunit#835
Migrate to container-based infrastructure http://docs.travis-ci.com/user/migrating-from-legacy/
There was a problem hiding this comment.
I assume you want to define pattern as a variable local to this function, so it's not mixed up with pattern defined by the parent function.
|
@vectart I left a couple of comments, please just let me know on any questions and thanks so far. |
|
@rxaviers Thanks for the useful comments, I've updated PR according to them |
|
Please, could you rebase on master ( |
There was a problem hiding this comment.
It's ok using i instead of index here. :)
|
Interestingly, the augmentation for |
|
Another worth doing test is checking against ICU... One difference I found is: |
There was a problem hiding this comment.
You might need use getBestMatchPattern() for each date and time before the type assignment above. For example, MMMMh should give July, 8 PM (type medium) instead of July at 8 PM (type long). Because, "MMMM" will be converted into "LLLL".
|
@vectart just let me know when you have progress, so we can land this fix. Thanks for your great work so far. |
reimplements globalizejs#462
|
How about to use builtin |
fixes #271