【JSP开源代码栏目提醒】:网学会员鉴于大家对JSP开源代码十分关注,论文会员在此为大家搜集整理了“fmt_date.jsp”一文,供大家参考学习
<%@ page contentType="text/html;charset=GBK"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head><title>Date Formatting</title></head>
<body>
<h3>Date Formatting and locale:</h3>
<hr>
<fmt:timeZone value="EST">
<jsp:useBean id="currentTime" class="java.util.Date" />
<!--中文,中国显示格式-->
<h5>Chinese, China</h5>
<fmt:setLocale value="zh_CN" />
<fmt:formatDate type="both" dateStyle="full" timeStyle="full" value="${currentTime}" /><br>
<!--英语,英国显示格式-->
<h5>English, Great Britain</h5>
<fmt:setLocale value="en_GB" />
<fmt:formatDate type="both" dateStyle="full" timeStyle="full" value="${currentTime}" /><br>
<!--英语,美国显示格式-->
<h5>English, USA</h5>
<fmt:setLocale value="en_US" />
<fmt:formatDate type="both" dateStyle="full" timeStyle="full" value="${currentTime}" /><br>
</fmt:timeZone>
</body>
</html>
上一篇:
fmt_currency.jsp
下一篇:
那些令你为之触动的好句子,感慨万分