Home  >  Article  >  Web Front-end  >  How to use AngularJS date formatting

How to use AngularJS date formatting

php中世界最好的语言
php中世界最好的语言Original
2018-05-29 10:34:192253browse

This time I will show you how to use AngularJS date formatting, what are the precautions for using AngularJS date formatting, the following is a practical case, let's take a look.




  
  AngularJS日期格式化
  
  

{{time| date:'yyyy-MM-dd EEE HH:mm:ss.sss'}}

{{time| date:'yyyy-MM-dd EEEE hh:mm:ss.sss'}}

本地化日期格式化:

{{time| date:'medium'}}

{{time| date:'short'}}

{{time| date:'fullDate'}}

{{time| date:'longDate'}}

{{time| date:'mediumDate'}}

{{time| date:'shortDate'}}

{{time| date:'mediumTime'}}

{{time| date:'shortTime'}}

年份格式化::

{{time| date:'yyyy'}}

{{time| date:'yy'}}

{{time| date:'y'}}

月份格式化:

{{time| date:'MMMM'}}

{{time| date:'MMM'}}

{{time| date:'MM'}}

{{time| date:'M'}}

日期格式化:

{{time| date:'dd'}}

{{time| date:'d'}}

星期格式化:

{{time| date:'EEEE'}}

{{time| date:'EEE'}}

小时格式化:

{{time| date:'HH'}}

{{time| date:'H'}}

{{time| date:'hh'}}

{{time| date:'h'}}

分钟格式化:

{{time| date:'m'}}

{{time| date:'mm'}}

秒格式化:

{{time| date:'ss'}}

{{time| date:'s'}}

毫秒格式化:

{{time| date:'sss'}}

字符格式化:

{{time| date:'a'}}

{{time| date:'Z'}}

Run results:

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

How to deal with Mac installation thrift error due to bison

How to correctly handle Taobao cnpm after installing cnpm is not Internal or external command

The above is the detailed content of How to use AngularJS date formatting. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn