Reputation: 2443
I'm looking for idea how to format unix timestamp with AngularJS date helper?
In official documentation, there is only explanation for string inputs (If no timezone is specified in the string input, the time is considered to be in the local timezone), but what about timestamp? Any hint?
Upvotes: 12
Views: 6448
Reputation: 24617
I've found some solution with custom filter and momentjs library:
app.filter('moment', function() {
return function(input, format) {
return moment(parseInt(input)).utc().format(format);
};
});
Upvotes: 6