It might be your locale settings on the client machine - if you are able to
change the source of the date, you can use `+new Date()` or `Date.now()`
(IE9+) to get back a timestamp instead and pass that along to the
formatter.
http://plnkr.co/edit/Nl8OYE9I9R1YetRl7bm4
I copied +Sander's reply above in there too.
Apparently you can't use functions in ng-init, so you have to initialize
lastlogin3 in the controller.
On Friday, 28 February 2014 03:25:19 UTC-5, Marc B wrote:
>
> Thanks Sander.
>
> This surprises me since this date format is from JavaScript new Date()...
>
> Marc
>
> On Friday, February 28, 2014 5:32:39 AM UTC+1, Sander Elias wrote:
>>
>> Hi Marc,
>>
>> Your date is not a recognized date format, and does not get parsed at al.
>> try this:
>>
>> <span ng-init="lastLogin='2014-02-27T22:54:35+0100'">
>> {{lastLogin | date:'EEEE, dd MMMM yyyy @ HH:mm:ss Z'}}
>> </span>
>> <br>
>> <span ng-init="lastLogin1='2014-02-27 22:54:35 +0100'">
>> {{lastLogin1 | date:'EEEE, dd MMMM yyyy @ HH:mm:ss Z'}}
>> </span>
>>
>> And you will see the difference
>>
>> Regards
>> Sander
>>
>
--
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/groups/opt_out.