Angularjs   发布时间:2022-04-20  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Angular4_时间显示时分 AM/PM大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

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


How To Use

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

Description

Where:

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

    • 'short': equivalent to'M/d/yy,h:mm a'(e.g.6/15/15,9:03 AM)
    • 'medium': equivalent to'MMM d,y,h:mm:ss a'(e.g.Jun 15,2015,9:03:01 AM)
    • 'long': equivalent to'MMMM d,h:mm:ss a z'(e.g.June 15,2015 at 9:03:01 AM GMT+1)
    • 'full': equivalent to'EEEE,MMMM d,h:mm:ss a zzzz'(e.g.@H_657_36@monday,June 15,2015 at 9:03:01 AM GMT+01:00)
    • 'shortDate': equivalent to'M/d/yy'(e.g.6/15/15)
    • 'mediumDate': equivalent to)
    • 'longDate': equivalent to'fullDate': equivalent to'shortTime': equivalent to'h:mm a'(e.g.9:03 AM)
    • 'mediumTime': equivalent to'h:mm:ss a'(e.g.9:03:01 AM)
    • 'longTime': equivalent to'h:mm:ss a z'(e.g.9:03:01 AM GMT+1)
    • 'fullTime': equivalent to'h:mm:ss a zzzz'(e.g.9:03:01 AM GMT+01:00)
  • 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,'+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.
  • localeis aStringdefining the locale to use (uses the currentLOCALE_IDby default)

大佬总结

以上是大佬教程为你收集整理的Angular4_时间显示时分 AM/PM全部内容,希望文章能够帮你解决Angular4_时间显示时分 AM/PM所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。