Angular4_时间显示时分 AM/PM

前端之家收集整理的这篇文章主要介绍了Angular4_时间显示时分 AM/PM前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<td>{{item.timeSlot| date:'h:mm a'}}</td>


How To Use

date_expression | date[:format[:timezone[:locale]]]

Description

Where:

  • @H_301_36@expressionis a date object or a number (milliseconds since UTC epoch) or an ISO string (https://www.w3.org/TR/NOTE-datetime).
  • @H_301_36@formatindicates which date/time components to include. The format can be predefined as shown below (all examples are given for@H_301_36@en-US) or custom as shown in the table.

    • @H_301_36@'short': equivalent to@H_301_36@'M/d/yy,h:mm a'(e.g.@H_301_36@6/15/15,9:03 AM)
    • @H_301_36@'medium': equivalent to@H_301_36@'MMM d,y,h:mm:ss a'(e.g.@H_301_36@Jun 15,2015,9:03:01 AM)
    • @H_301_36@'long': equivalent to@H_301_36@'MMMM d,h:mm:ss a z'(e.g.@H_301_36@June 15,2015 at 9:03:01 AM GMT+1)
    • @H_301_36@'full': equivalent to@H_301_36@'EEEE,MMMM d,h:mm:ss a zzzz'(e.g.@H_301_36@Monday,June 15,2015 at 9:03:01 AM GMT+01:00)
    • @H_301_36@'shortDate': equivalent to@H_301_36@'M/d/yy'(e.g.@H_301_36@6/15/15)
    • @H_301_36@'mediumDate': equivalent to)
    • @H_301_36@'longDate': equivalent to@H_301_36@'fullDate': equivalent to@H_301_36@'shortTime': equivalent to@H_301_36@'h:mm a'(e.g.@H_301_36@9:03 AM)
    • @H_301_36@'mediumTime': equivalent to@H_301_36@'h:mm:ss a'(e.g.@H_301_36@9:03:01 AM)
    • @H_301_36@'longTime': equivalent to@H_301_36@'h:mm:ss a z'(e.g.@H_301_36@9:03:01 AM GMT+1)
    • @H_301_36@'fullTime': equivalent to@H_301_36@'h:mm:ss a zzzz'(e.g.@H_301_36@9:03:01 AM GMT+01:00)
  • @H_301_36@timezoneto be used for formatting. It understands UTC/GMT and the continental US time zone abbreviations,but for general use,use a time zone offset,for example,@H_301_36@'+0430'(4 hours,30 minutes east of the Greenwich meridian) If not specified,the local system timezone of the end-user's browser will be used.
  • @H_301_36@localeis a@H_301_36@stringdefining the locale to use (uses the currentLOCALE_IDby default)

猜你在找的Angularjs相关文章