Java common date operations

Sort out the date operations commonly used in Java.

1. Date formatting

/** date formatting class (must master) * API: * G era flag text ad y year 1996; month July; Jul in 96 m year; weeks in 07 w year number 27 weeks in W month number 2 days in D year number 189 days in D month number 10 f month number 2 days in e week text Tuesday; Tue a am / PM flag text PM h hours in a day (0-23) number 0 K hours in a day (1-24) number 24 K AM / PM (0-11) number 0 h am / PM hours (1-12) number 12 m hours minutes number 30 s minutes number 55 s milliseconds number 978 Z time zone general time zone pacific standard time; PST; gmt-08:00 Z time zone RFC 822 time zone - 0800

*/

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>