一、jstl国际化标签库:

fmt:setLocale          设定用户所在的区域;

fmt:formatDate           对日期进行格式化

fmt:requestEncoding      设置所有的请求编码;

fmt:bundle fmt:message    读取国际化资源;

fmt:formatNumber        格式化数字;

fmt:timeZone          设置临时时区

fmt:setLocale:

 1 <body>
 2 <%
 3     pageContext.setAttribute("date",new Date());
 4 %>
 5 中文日期:
 6 <fmt:setLocale value="zh_CN"/>
 7 <fmt:formatDate value="${date }"/>
 8 <hr/>
 9 英文日期:
10 <fmt:setLocale value="en_US"/>
11 <fmt:formatDate value="${date }"/>
12 </body>
View Code

相关文章:

  • 2022-01-01
  • 2021-11-08
  • 2022-01-21
  • 2022-12-23
  • 2022-02-05
猜你喜欢
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2021-07-28
相关资源
相似解决方案