zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    第二次站立会议
    小组第一次站立会议
    用户场景描述
    本周学习总结
    构建之法阅读笔记之三
    本周的学习收获
    java连接Oracle数据库
    scott用户不存在
    大二暑假第五周总结
    业务用例分析
  • 原文地址:https://www.cnblogs.com/yunzhexiaye/p/6293665.html
Copyright © 2011-2022 走看看