static String |
getFormatDatetime(Date date,
String dateFormat)
格式化日期为字符串
y
年
Year1996 ; 96 M
年中的月份
MonthJuly ; Jul ; 07 w
年中的周数
Number27 W
月份中的周数
Number2 D
年中的天数
Number189 d
月份中的天数
Number10 F
月份中的星期
Number2 E
星期中的天数
TextTuesday ; Tue a
Am/pm 标记
TextPM H
一天中的小时数(0-23)
Number0 k
一天中的小时数(1-24)
Number24 K
am/pm 中的小时数(0-11)
Number0 h
am/pm 中的小时数(1-12)
Number12 m
小时中的分钟数
Number30 s
分钟中的秒数
Number55 S
毫秒数
Number978 z
时区
General time zonePacific Standard Time ; PST ;
GMT-08:00 Z
时区
RFC 822 time zone-0800
字母
| 日期或时间元素
| 表示
| 示例
G
Era 标志符
Text
AD
|
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
DateFormatTools
public DateFormatTools()
Copyright © 2018. All rights reserved.
|