12

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?

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265
sasa
  • 2,443
  • 5
  • 23
  • 35
  • suggest you add specific examples of input / output. Docs aren't specific about string inputs, will accept any valid input that javascript `new Date()` accepts – charlietfl Dec 09 '13 at 13:47

1 Answers1

6

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);  
    };  
});  
Community
  • 1
  • 1
Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265