On trying the inbuilt angularjs date filter to format the date string, I am not getting the formatted date for "2016-05-17 14:45:59+04",
See the plunkr https://plnkr.co/edit/VzRpNFkrWasv3nPlIQyg?p=preview ,
Please help me in understanding why it is working and I am getting the proper date object when I parse the string "2016-05-17 14:45:59+04" using see the screenshot
Thanks in advance for any help.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example - example-example101-production</title>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
</head>
<body ng-app="">
<span ng-non-bindable>{{2016-05-17 14:45:59+04 | date:'yyyy-MM-dd'}}</span>:
<span>{{'2016-05-17 14:45:59+04' | date:'yyyy-MM-dd'}}</span><br>
</body>
</html>
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->

Dateobject instead of passing it as a string to filter.