urish / angular-moment

Moment.JS directives for Angular.JS (timeago and more)
MIT License
2.6k stars 397 forks source link

Fractional time with zones fails to parse correctly #249

Closed revmischa closed 8 years ago

revmischa commented 8 years ago

This is a valid datetime: 2016-05-21T00:47:46.873709+00:00

Error: [$parse:syntax] Syntax Error: Token 'T01' is an unexpected token at column 11 of the expression [2016-05-21T01:00:59.390463+00:00] starting at [T01:00:59.390463+00:00]

"If necessary for a particular application, the standard supports the addition of a decimal fraction to the smallest time value in the representation." https://en.wikipedia.org/wiki/ISO_8601

urish commented 8 years ago

Seems like an error thrown by the Angular template compiler. You probably need to wrap the string you are passing with quotes.