java front page conversion date time format

<fmt:formatDate value="${isoDate}" type="both"/>
2004-5-31 23:59:59
<fmt:formatDate value="${date}" type="date"/>
2004-4-1
<fmt:formatDate value="${isoDate}" type="time"/>
23:59:59
<fmt:formatDate value="${isoDate}" type="date" dateStyle="default"/>
2004-5-31
<fmt:formatDate value="${isoDate}" type="date" dateStyle="short"/>
04-5-31
<fmt:formatDate value="${isoDate}" type="date" dateStyle="medium"/>
2004-5-31
<fmt:formatDate value="${isoDate}" type="date" dateStyle="long"/> Monday May 31, 2004 <fmt:formatDate value="${isoDate}" type="date" dateStyle="full"/>
May 31, 2004


<fmt:formatDate value="${isoDate}" type="time" timeStyle="default"/>
23:59:59
<fmt:formatDate value="${isoDate}" type="time" timeStyle="short"/>
下午11:59
<fmt:formatDate value="${isoDate}" type="time" timeStyle="medium"/>
23:59:59
<fmt:formatDate value="${isoDate}" type="time" timeStyle="long"/>
下午11时59分59秒
<fmt:formatDate value="${isoDate}" type="time" timeStyle="full"/>
下午11时59分59秒 CDT
<fmt:formatDate value="${date}" type="both" pattern="EEEE, MMMM d, yyyy HH:mm:ss Z"/>
星期四, 四月 1, 2004 13:30:00 -0600 model:31 May 04, 11:59:59 PM CDT Format
<fmt:formatDate value="${isoDate}" type="both" pattern="d MMM yy, h:m:sa zzzz/>


  Day of the month d. One-digit dates have no leading zeros.   
  dd The day of the month. Single-digit dates have a leading zero.   
  ddd Abbreviated name of the day of the week, as defined in AbbreviatedDayNames.   
  dddd The full name of the day of the week, as defined in DayNames.   
  M month number. Single-digit months without leading zeros.   
  MM month number. Single-digit months have a leading zero.   
  Abbreviated names of MMM months, as defined in AbbreviatedMonthNames.   
  MMMM The full name of the month, as defined in MonthNames.   
  y does not contain the year of the epoch. If the year without the epoch is less than 10, display the year without leading zeros.   
  yy The year that does not contain the epoch. If the year without the epoch is less than 10, display the year with leading zeros.   
  yyyy Four-digit year including the epoch.   
  gg period or era. The pattern is ignored if the date to be formatted does not have an associated period or era string.   
  h 12-hour hour. Single-digit hours without leading zeros.   
  hh Hour in 12-hour clock. Single-digit hours have leading zeros.   
  H 24-hour hour. Single-digit hours without leading zeros.   
  HH 24-hour hour. Single-digit hours have leading zeros.   
  m minutes. Single-digit minutes without leading zeros.   
  mm minutes. Single-digit minutes have a leading zero.   
  s seconds. Single-digit seconds without leading zeros.   
  ss seconds. Single-digit seconds have a leading zero.
<fmt:formatDate value="${xx}" pattern="dd/MM/yyyy HH:mm aa"/> and
<fmt:formatDate value="${xx}" pattern="dd/MM/yyyy hh: mm aa"/> The result displayed is different for 0 o'clock

h: hour, from 1 to 12, minute am and afternoon range: 01:00 AM~12:59AM
H: hour, from 0 to 23 range: 00:00 AM~ 23:59AM

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326905631&siteId=291194637