关注分享主机优惠活动
国内外VPS云服务器

Java 8时间完全了解Java.Time.temporal.Chronofield

摘要:关注我的项目。这篇博客文章仅是为了改善时间工具的测试过程。

关注我的项目:https://github.com/duanluan/zutil。这篇博客文章仅是为了改善时间工具的测试过程。

代码:

@displayname(“时间工具测试”)公共类dateutilstest {@displayname(“ explore chronofield”)@test void testchronofield(){字符串indent = “/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/T/ t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/T/ t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/T/ t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/t/T/ //时间:AD,即当前的时间系统。 01T02:30:32.723是一个2年的系统。//年system.out.ut.println(现在。 //预期月,月份是从0年开始计算的(从0开始),2021年10月的值为2021 * 12 + 10 - 1 System.out.println(whith(chronofield.preoleptic_month,0) +缩进 +缩进 +“预期月”); //月份system.out.println(现在。 //年对齐周:一年中的第一天是第一周的第一天。 //每月对齐周:一个月的第一天是本月第一周的第一天。 //年度year system.out.ut.println(现在2)。(Chronofie)地球ld.aligned_day_of_week_in_month,5) +缩进 +“月亮的对齐周一天”); //一年中的days system.out.println(现在。 //一年中的day system.out.println(现在。 //每天的天system.out.println(现在。 //从1970年开始- 01 - 01 AS 0(忽略偏移和时区)system.out.println(whhit(chronofield.epoch_day,1) +缩进 +“ 1970 - 01 - 01 as 0(aS 0(aS 0)0) system.out.println(现在。 system.out.println(现在。时间“); 1)(chronofield.hour_of_ampm,0) +“时间”; system.out.println(现在system.out.println(现在。h(chronofield.minute_of_day,1) +缩进 +“几天的分钟”); // time system.out.println(现在。 //秒system.out.println(现在。 // minute system.out.println(现在。 // 1970 - 01 -秒从01t00:00z(iso)开始与时区( +时区time)system.out.atzone(now.systemdefault())(chronofield.instant_sonds,1) +“/t/t/t/tzection +”/t/tzection iis is is is is iis is is iis is iis is iis is ies is is iiss ies is iiss.tzone(now.systemdefault()01 - 01 -(k4)(与时区(+时区时间)一起使用”); //毫秒days system.out.println(现在。 // system.out.println(现在。 // system.out.println的微秒(now.with(chronofield.mic))ro_of_day,1) + indent.replacefirst(“/t/t”,“”) +“ microseconds”); //秒microseconds system.out.println(now.with(chronofield.micro_of_seconds,1) + indent.replacefirst(“/t/t/t”,“”,“”,“”) +“ Microseconds”); //秒system.out.println(now.with(chronofield.nano_of_second,1) + indent.replaceFirst(“/t/t/t/t/t/t”,“”,“”) +“ sec nanseconds”); }}}

操作结果与“ 2020 - 11 - 21 16:10:43.532的差异与时间。

- 2020 - 11 - 21t16:10:43.532 ERA:2021 - 11 - 21t16:10:43.532 ERA:AD。 - 0001 - 11 - 21t16:10:43.532年0002 - 11 - BC。 21T16:10:43.532 AD 2020 - 11 - 21T16:10:43.532 Year 0000 - 01 - 21T16:10:43.532 Prediction 2021 - 09 - 21T16:10:43.532 - 01] Aligned Week 2021 - 11 - 12T16:10:43.532一对齐周2021 - 11 - 12t16:10:43.532对齐周2021 - 11 - 01t16:10:43.532 2021 - - 11 - 11 - 15t16:15t16:10:10:43.532周, 02T16:10:43.532 1970 - 01 - 01 - 01 - 01 - 01 - 01 - 01 2021 - 11 - 11 - 21t04:10:10:10:43.532 am(0 - 12) 2021 - 11 - 21t12:10:43.532上午或201pm -时间2021 - 11 - 21t12:10:43.532 pm时间2021 - 11 - 11 - 21t13:10:10:10:43.532 pm Timp pm Time 2021 -时间2021 - 11 - 211 33:433:433:433:433:433:433:43. - 11 - 21t13:10:43.532 AM 12时间系统时间2021 - 11 - 21t13:10:43.532 PM 12小时系统时间2021 - 11 - 21t00:10:10:43.532天2021 - 11 - 11 - 11 - 21t00:00:00:01.532天2021年2021年2021年5月21日- 21 00:01 00:01 00:01 00:k4] 21 00:k4] 21 00:k4] 21 00:k4] 21 00:k4] 21 00: - 11 - 21T16:10:01.532 minutes 1970 - 01 - 01 - 01 - 01T08:00:00:01.532+08:00 [asia/shanghai with be ase of seed seed seed seed seed seed seed seed seed a seed seed time zone time) 2021 - 11 - 21T00: 00:00.001天毫秒2021 - 11 - 21T16:10:43.001秒毫秒毫秒2021 - 11 - 21t00:00.00.00001 days 2021 2021 - - 11 - 11 - 21t00:00:00:00:00 0001天2021 - 2021 - 2021 - 2021 [21] 21T16:10:43.0000001SEC纳米秒

未经允许不得转载:主机频道 » Java 8时间完全了解Java.Time.temporal.Chronofield

相关推荐

评论 抢沙发

评论前必须登录!