📄 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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -