Date represents
<fmt:formatDate value="${DATE1}" pattern="yyyy-MM-dd hh:mm:ss" type="date" dateStyle="long" /> <fmt:formatDate value="${DATE2}" type="date" pattern="yyyy-MM-dd"/>
Percent, thousandth represents
<fmt:formatNumber value="${DoubleVALUE}" type="number" pattern="0.00‰" /> 0.01 ‰ <fmt:formatNumber value="${DoubleVALUE}" type="number" pattern="0.00%" /> 0.20 %
Other digital representation
<fmt:formatNumber value="123456.7891" pattern="#,#00.0#"/> -- 123,456.79 <fmt:formatNumber value="123456.7" pattern="#,#00.0#"/> -- 123,456.7 <fmt:formatNumber value="123456.7" pattern="#,#00.00#"/> -- 123,456.70 <fmt:formatNumber value="12" type="percent" /> -- 1,200%type 可以是currency、 number、 和percent。
Currency representation
===1 <fmt:setLocale value="ch_CH" /> <fmt:formatNumber value="${data}" type="currency" /> ==2 <fmt:formatNumber value="${doubleValue}" type="number" pattern="¥0.00" />
The output format of fmt:formatDate
<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"/>2004年5月31日 <fmt:formatDate value="${isoDate}" type="date" dateStyle="full"/>2004年5月31日 星期一 <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 <fmt:formatDate value="${isoDate}" type="both" pattern="d MMM yy, h:m:s a zzzz/>31 五月 04, 11:59:59 下午 中央夏令时
Format mode:
d A certain day in the month. Single-digit dates have no leading zeros.
dd A certain day in the month. Single-digit dates have a leading zero.
ddd The abbreviated name of a day of the week, defined in AbbreviatedDayNames.
dddd The full name of a day of the week, as defined in DayNames .
M Month number. Single-digit months have no leading zeros.
MM month number. Single-digit months have a leading zero.
MMM The abbreviated name of the month, defined in AbbreviatedMonthNames.
MMMM The full name of the month, as defined in MonthNames .
y The year without the epoch. If the year without the epoch is less than 10, the year without leading zeros is displayed.
yy Year without epoch. If the year without the epoch is less than 10, the year with leading zeros is displayed.
yyyy A four-digit year including the epoch.
gg Period or era. If the date being formatted does not have an associated period or epoch string, the pattern is ignored.
h The hour in the 12-hour clock. Single-digit hours have no leading zeros.
hh Hour in 12-hour format. Single-digit hours have leading zeros.
H Hour in 24-hour format. Single-digit hours have no leading zeros.
HH Hour in 24-hour format. Single-digit hours have leading zeros. · Single-digit minutes have no leading zeros.
mm minutes. Single-digit minutes have a leading zero.
s seconds. Single-digit seconds have no leading zeros.
ss seconds. Single-digit seconds have a leading zero.
<fmt:formatDate value="${xx}" pattern="dd/MM/yyyy HH:mm aa"/>和 <fmt:formatDate value="${xx}" pattern="dd/MM/yyyy hh:mm aa"/> 对于0点显示的结果不一样
The above is the detailed content of Detailed explanation of JSTL data formatting examples. For more information, please follow other related articles on the PHP Chinese website!

To build a website with powerful functions and good user experience, HTML alone is not enough. The following technology is also required: JavaScript gives web page dynamic and interactiveness, and real-time changes are achieved by operating DOM. CSS is responsible for the style and layout of the web page to improve aesthetics and user experience. Modern frameworks and libraries such as React, Vue.js and Angular improve development efficiency and code organization structure.

Boolean attributes are special attributes in HTML that are activated without a value. 1. The Boolean attribute controls the behavior of the element by whether it exists or not, such as disabled disable the input box. 2.Their working principle is to change element behavior according to the existence of attributes when the browser parses. 3. The basic usage is to directly add attributes, and the advanced usage can be dynamically controlled through JavaScript. 4. Common mistakes are mistakenly thinking that values need to be set, and the correct writing method should be concise. 5. The best practice is to keep the code concise and use Boolean properties reasonably to optimize web page performance and user experience.

HTML code can be cleaner with online validators, integrated tools and automated processes. 1) Use W3CMarkupValidationService to verify HTML code online. 2) Install and configure HTMLHint extension in VisualStudioCode for real-time verification. 3) Use HTMLTidy to automatically verify and clean HTML files in the construction process.

HTML, CSS and JavaScript are the core technologies for building modern web pages: 1. HTML defines the web page structure, 2. CSS is responsible for the appearance of the web page, 3. JavaScript provides web page dynamics and interactivity, and they work together to create a website with a good user experience.

The function of HTML is to define the structure and content of a web page, and its purpose is to provide a standardized way to display information. 1) HTML organizes various parts of the web page through tags and attributes, such as titles and paragraphs. 2) It supports the separation of content and performance and improves maintenance efficiency. 3) HTML is extensible, allowing custom tags to enhance SEO.

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 English version
Recommended: Win version, supports code prompts!
