This repository was archived by the owner on May 23, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +25
-4
lines changed
Expand file tree Collapse file tree 4 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 1515 ],
1616 "author" : " Eric Ferraiuolo <eferraiuolo@gmail.com>" ,
1717 "contributors" : [
18- " Drew Folta <drew@folta.net >" ,
18+ " Anthony Pipkin <a.pipkin@yahoo.com >" ,
1919 " Caridy Patino <caridy@gmail.com>" ,
20- " Anthony Pipkin <a.pipkin@yahoo.com>"
20+ " Drew Folta <drew@folta.net>" ,
21+ " Long Ho <holevietlong@gmail.com"
2122 ],
2223 "bugs" : {
2324 "url" : " https://github.com/formatjs/intl-messageformat/issues"
Original file line number Diff line number Diff line change 11// GENERATED FILE
2- export default { " locale" : "en" } ;
2+ export default { locale : "en" } ;
Original file line number Diff line number Diff line change @@ -447,4 +447,24 @@ describe("IntlMessageFormat", function() {
447447 expect ( ptMZ . format ( { num : 100 } ) ) . to . equal ( "other" ) ;
448448 } ) ;
449449 } ) ;
450+
451+ it ( "custom formats should work" , function ( ) {
452+ var msg = "Today is {time, date, verbose}" ;
453+ var mf = new IntlMessageFormat ( msg , "pt" , {
454+ date : {
455+ verbose : {
456+ month : "long" ,
457+ day : "numeric" ,
458+ year : "numeric" ,
459+ hour : "numeric" ,
460+ minute : "numeric" ,
461+ second : "numeric" ,
462+ timeZoneName : "short"
463+ }
464+ }
465+ } ) ;
466+ expect ( mf . format ( { time : 0 } ) ) . to . contain (
467+ "Today is 31 de dezembro de 1969 19:00:00"
468+ ) ;
469+ } ) ;
450470} ) ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ if (typeof Intl === "undefined") {
22 require ( "intl" ) ;
33}
44
5- require ( ' intl-pluralrules' )
5+ require ( " intl-pluralrules" ) ;
66
77global . expect = require ( "expect.js" ) ;
88global . IntlMessageFormat = require ( "../" ) ;
You can’t perform that action at this time.
0 commit comments