java时间格式的简单整理
概述
我们不是只有现在吗
⾃⼰在使⽤Java⽇志格式的时候,发现不好定义。所以本篇⽂章的主要⽬的是收集⼀些常⽤的⽇志格式,解说每个字段代表的意思以及扩充部分Java常⽤的时间类。
名词解释
时刻:时刻是时间上的某个瞬间,,或是时间轴上的某个点。时刻可以作为时间间隔的起点和终点
木薯粉的功效与作用时代:⼀个时代是⽤作测量其他时刻的起源的瞬间。时代是在1970-01-01T00:00:00Z。时代之后的时刻具有正值,⽽时代之前的时刻具有负值。
java 8类说明
java.time 包含的api都是基于iso 8601的。
1.java.time.LocalDate:LocalDate是⼀个不可变的类,它表⽰默认格式(yyyy-MM-dd)的⽇期
2.java.time.LocalTime:LocalTime是⼀个不可变的类,它的实例代表⼀个符合⼈类可读格式的时间,默认
格式是hh: ISO字符替代说明
[Y] reprents a digit ud in the time element “year”;
[M] reprents a digit ud in the time element “month”;
[D] reprents a digit ud in the time element “day”;
[w] reprents a digit ud in the time element “week”;
[h] reprents a digit ud in the time element “hour”;
[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.
时间格式收录
序号格式⽰例黑豆茶
1yyyy/MM/dd HH:mm:ss Z2018/05/16 15:09:02 +0800
高中政治教案以上就是本⽂的全部内容,希望对⼤家的学习有所帮助,也希望⼤家多多⽀持。