java定义⽇期格式_Java时间格式定义详解merry是什么意思中文
概述
⾃⼰在使⽤Java⽇志格式的时候,发现不好定义。所以本篇⽂章的主要⽬的是收集⼀些常⽤的⽇志格式,解说每个字段代表的意思以及扩充部分Java常⽤的时间类。
重要参考⽂档
⽂章进度2018515 完成部分时间格式收录
20180517 收录⼀些名词
名词解释时刻:时刻是时间上的某个瞬间,,或是时间轴上的某个点。时刻可以作为时间间隔的起点和终点
时代:⼀个时代是⽤作测量其他时刻的起源的瞬间。 时代是在1970-01-01T00:00:00Z。时代之后的时刻具有正值,⽽时代之前的时刻具有负值。
java 8类说明
java.time 包含的api都是基于iso 8601的。java.time.LocalDate:LocalDate是⼀个不可变的类,它表⽰默认格式(yyyy-MM-dd)的⽇期
java.time.LocalTime:LocalTime是⼀个不可变的类,它的实例代表⼀个符合⼈类可读格式的时间,默认格式是hh:
[Y] reprents a digit ud in the time element “year”;
[M] reprents a digit ud in the time element “month”;vaka
[D] reprents a digit ud in the time element “day”;
宁为妓不为师leave过去式[w] reprents a digit ud in the time element “week”;
[h] reprents a digit ud in the time element “hour”;
win the day
[m] reprents a digit ud in the time element “minute”;
[s] reprents a digit ud in the time element “cond”;职称英语报名网站
[n] reprents a digit from a positive integer or zero;
[±] reprents a plus sign [+] if in combination with the following element a positive value or zero needs to be reprented (in this ca, unless explicitly stated otherwi, the plus sign shall not be omitted), or a minus sign [−] if in combination with the following element a negative value needs to be reprented.
小春留学论坛
In addition the following convention applies:
[_] When any of the characters reprenting a digit is underlined, it reprents zero or more digits
in the corresponding date and time reprentation.
Other characters in the date and time format reprentations are copied in the date and time
reprentations.charme
image1.png
化学符号image2.png
时间格式收录序号格式⽰例1yyyy/MM/dd HH:mm:ss Z2018/05/16 15:09:02 +0800
附录
你好英文