How to show date with timezone in angularjs?

后端 未结 1 741
傲寒
傲寒 2021-01-22 22:00

i am using angularjs filter date. i have used this one

 var date = new Date(\"09 apr 2015 12:00:50 UT\");
 $filter(\'date\')(date, \"dd MMM yyyy  hh:mm:ss a Z\"         


        
1条回答
  •  后悔当初
    2021-01-22 22:04

    i don't think you can do it out of the box with plain angular.js, but you can use a library like angular-moment. moment.js supports variety of formats: http://momentjs.com/docs/#/displaying/format/

    0 讨论(0)
提交回复
热议问题