I use the Ionic Framework to create an RSS feed with Google's Feed API (https://developers.google.com/feed/v1/reference). Rss Feed works but Published Date is not formatted. For date formatting, I use the angular-locale_de-de.js
, so that I can use the German time format.
call of the published date:
<span>{{entry.publishedDate}}</span>
This is shown:
Tue, 07 Jul 2015 23:22:19 -0700
I would like the date to be displayed as follows:
Dienstag, 7. Juli 2015, 23:22
How can I call the date after formatting?
For the language problem (as being English instead of German) The reference to angular-locale_de-de.js must be broken. Otherwise you at least get the German language in the formatting. (here I assume publishedDate is actually a date, not a string)
For the formatting, either you can create a new AngularJS filter, or just combine existing filters. Here are two ways to achieve what you want
<span ng-controller="Ctrl1">
{{entry.PublishedDate |date : "fullDate" }}
{{entry.PublishedDate |date : "shortTime" }}
<br/>
{{(entry.PublishedDate |date : "fullDate")+" "+(entry.PublishedDate |date : "shortTime") }}
</span>
which I have put into this Plunker
http://plnkr.co/edit/7hcJeq4auYvPZK1diuVR?p=preview
and creates date and time in German