• angular中事件戳转日期的格式


    本地化日期格式化:
    ({{ today | date:'medium' }})Nov 19, 2015 3:57:48 PM
    ({{ today | date:'short' }})11/19/15 3:57 PM
    ({{ today | date:'fullDate' }})Thursday, November 19, 2015
    ({{ today | date:'longDate' }})November 19, 2015
    ({{ today | date:'mediumDate' }})Nov 19, 2015
    ({{ today | date:'shortDate' }})11/19/15
    ({{ today | date:'mediumTime' }})3:57:48 PM
    ({{ today | date:'shortTime' }})3:57 PM
    年份格式化:
    四位年份:({{ today | date:'yyyy' }})2015
    两位年份:({{ today | date:'yy' }})15
    一位年份:({{ today | date:'y' }})2015
    月份格式化:
    英文月份:({{ today | date:'MMMM' }})November
    英文月份简写:({{ today | date:'MMM' }})Nov
    两位数字月份:({{ today | date:'MM' }})11
    一年中的第几个月份:({{ today | date:'M' }})11
    日期格式化:
    数字日期:({{ today | date:'dd' }})19
    一个月中的第几天:({{ today | date:'d' }})19
    英文星期:({{ today | date:'EEEE' }})Thursday
    英文星期简写:({{ today | date:'EEE' }})Thu
    小时格式化:
    <a href="https://www.baidu.com/s?wd=24%E5%B0%8F%E6%97%B6%E5%88%B6&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YdnH0vPj9bnjwBmvDLPWcz0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHmsPWfsnHmdPWTdrHfdnWDsPs"target="_blank" class="baidu-highlight">24小时制</a>数字小时:({{ today | date:'HH' }})15
    一天中的第几个小时:({{ today | date:'H' }})15
    12小时制数字小时:({{ today | date:'hh' }})03
    上午或下午的第几个小时:({{ today | date:'h' }})3
    分钟格式化:
    数字分钟数:({{ today | date:'mm' }})57
    一个小时中的第几分钟:({{ today | date:'m' }})57
    秒数格式化:
    数字秒数:({{ today | date:'ss' }})48
    一分钟中内的第几秒:({{ today | date:'s' }})48
    <a href="https://www.baidu.com/s?wd=%E6%AF%AB%E7%A7%92&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YdnH0vPj9bnjwBmvDLPWcz0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHmsPWfsnHmdPWTdrHfdnWDsPs" target="_blank" class="baidu-highlight">毫秒</a>数格式化:
    <a href="https://www.baidu.com/s?wd=%E6%AF%AB%E7%A7%92&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YdnH0vPj9bnjwBmvDLPWcz0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHmsPWfsnHmdPWTdrHfdnWDsPs" target="_blank" class="baidu-highlight">毫秒</a>数:({{ today | date:'sss' }})541
    字符格式化:
    上下午标识:({{ today | date:'a' }})PM
    四位时区标识:({{ today | date:'Z' }})+0800
    自定义日期格式化:
    年月日:({{ today | date:'yyyy-MM-dd' }})2015-11-19
    时分秒:({{ today | date:'HH:mm:ss.sss' }})15:57:48.541
    本地化日期格式化:
    ({{ today | date:'medium' }})Nov 19, 2015 3:57:48 PM
    ({{ today | date:'short' }})11/19/15 3:57 PM
    ({{ today | date:'fullDate' }})Thursday, November 19, 2015
    ({{ today | date:'longDate' }})November 19, 2015
    ({{ today | date:'mediumDate' }})Nov 19, 2015
    ({{ today | date:'shortDate' }})11/19/15
    ({{ today | date:'mediumTime' }})3:57:48 PM
    ({{ today | date:'shortTime' }})3:57 PM
    年份格式化:
    四位年份:({{ today | date:'yyyy' }})2015
    两位年份:({{ today | date:'yy' }})15
    一位年份:({{ today | date:'y' }})2015
    月份格式化:
    英文月份:({{ today | date:'MMMM' }})November
    英文月份简写:({{ today | date:'MMM' }})Nov
    两位数字月份:({{ today | date:'MM' }})11
    一年中的第几个月份:({{ today | date:'M' }})11
    日期格式化:
    数字日期:({{ today | date:'dd' }})19
    一个月中的第几天:({{ today | date:'d' }})19
    英文星期:({{ today | date:'EEEE' }})Thursday
    英文星期简写:({{ today | date:'EEE' }})Thu
    小时格式化:
    <a href="https://www.baidu.com/s?wd=24%E5%B0%8F%E6%97%B6%E5%88%B6&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YdnH0vPj9bnjwBmvDLPWcz0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHmsPWfsnHmdPWTdrHfdnWDsPs"target="_blank" class="baidu-highlight">24小时制</a>数字小时:({{ today | date:'HH' }})15
    一天中的第几个小时:({{ today | date:'H' }})15
    12小时制数字小时:({{ today | date:'hh' }})03
    上午或下午的第几个小时:({{ today | date:'h' }})3
    分钟格式化:
    数字分钟数:({{ today | date:'mm' }})57
    一个小时中的第几分钟:({{ today | date:'m' }})57
    秒数格式化:
    数字秒数:({{ today | date:'ss' }})48
    一分钟中内的第几秒:({{ today | date:'s' }})48
    <a href="https://www.baidu.com/s?wd=%E6%AF%AB%E7%A7%92&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YdnH0vPj9bnjwBmvDLPWcz0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHmsPWfsnHmdPWTdrHfdnWDsPs" target="_blank" class="baidu-highlight">毫秒</a>数格式化:
    <a href="https://www.baidu.com/s?wd=%E6%AF%AB%E7%A7%92&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YdnH0vPj9bnjwBmvDLPWcz0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHmsPWfsnHmdPWTdrHfdnWDsPs" target="_blank" class="baidu-highlight">毫秒</a>数:({{ today | date:'sss' }})541
    字符格式化:
    上下午标识:({{ today | date:'a' }})PM
    四位时区标识:({{ today | date:'Z' }})+0800
    自定义日期格式化:
    年月日:({{ today | date:'yyyy-MM-dd' }})2015-11-19
    时分秒:({{ today | date:'HH:mm:ss.sss' }})15:57:48.541
  • 相关阅读:
    混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集。
    SQL中获取自增长的最大ID
    (inline)内联函数在IOS开发中的使用
    MS SQL SERVER 2005 高可用性之日志传送
    19_toast通知和notify通知 onTouch事件响应
    20 按比例设置 子控件的宽度和高度
    18_SurfaceView 其他线程绘图
    使用Microsoft Media Service实现网络影音多媒体应用系列第三篇技术要点
    使用Microsoft Media Service实现网络影音多媒体应用系列第二篇开发须知
    MVC3WIN7下的IIS7.5部署MVC3应用程序
  • 原文地址:https://www.cnblogs.com/yunzhexiaye/p/6293665.html
Copyright © 2020-2023  润新知