Glad I found this post. Very irritating that this still is an issue in 2014.
On Tuesday, August 28, 2012 6:07:14 AM UTC-4, pVelicherla wrote: > > Those are reserved keywords. > > On Friday, January 20, 2012 1:04:39 AM UTC+5:30, Dan Doyon wrote: >> >> I found this same issue with datejs, its good to know the root cause. >> >> thanks >> >> >> ------------------------------ >> *From:* Luke Bunselmeyer <[email protected]> >> *To:* [email protected] >> *Sent:* Thursday, January 19, 2012 10:31 AM >> *Subject:* [angular.js] Issues compressing angular 0.9.19 in YUI >> Compressor and Google Closure JS >> >> Hello, >> >> I came across an issue compressing angular 0.9.19 in YUI Compressor and >> Google Closure JS. Specifically, both minifiers throw syntax errors with >> the "long" and "short" properties on DEFAULT_DATETIME_FORMATS. Both "long" >> and "short" are reserved JS names. I fixed by wrapping each property in >> single quotes. >> >> IS: >> >> var DEFAULT_DATETIME_FORMATS = { >> long: 'MMMM d, y h:mm:ss a z', >> medium: 'MMM d, y h:mm:ss a', >> short: 'M/d/yy h:mm a', >> fullDate: 'EEEE, MMMM d, y', >> longDate: 'MMMM d, y', >> mediumDate: 'MMM d, y', >> shortDate: 'M/d/yy', >> longTime: 'h:mm:ss a z', >> mediumTime: 'h:mm:ss a', >> shortTime: 'h:mm a' >> }; >> >> SHOULD BE: >> >> var DEFAULT_DATETIME_FORMATS = { >> 'long': 'MMMM d, y h:mm:ss a z', >> medium: 'MMM d, y h:mm:ss a', >> 'short': 'M/d/yy h:mm a', >> fullDate: 'EEEE, MMMM d, y', >> longDate: 'MMMM d, y', >> mediumDate: 'MMM d, y', >> shortDate: 'M/d/yy', >> longTime: 'h:mm:ss a z', >> mediumTime: 'h:mm:ss a', >> shortTime: 'h:mm a' >> }; >> >> Thanks, >> Luke >> >> -- >> You received this message because you are subscribed to the Google Groups >> "AngularJS" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to angular+ >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/angular?hl=en. >> >> >> >> -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
