Java8的时间日期API

衡重式路肩墙计算书详解:土压力计算与稳定性验算要点 在公路与山区支挡结构设计中,挡土墙的土压力计算与稳定性验算是确保结构安全的核心环节。衡重式挡土墙利用衡重台上方填土自重增强墙体稳定,设计时需先判定第二破裂面是否出现,再依据库仑理论分解上下墙土压力,进而完成抗滑动、抗倾覆及地基承载力验算。通过参数化建模和Python批量复算,工程师可以快速对比不同墙高、不同填料参数下的安全系数,显著提升设计复核效率。该方法适用于4m至9m墙高的公路路肩墙设计、审图复核及教学培训场景,尤其对低墙工况中的车辆荷载换算、基底倾斜时的土契重力等易错细节有清晰指导。本文以四套典型算例 阅读详情

Java8的时间日期API

原先的时间 api  大部分已经过时了

Date构造器 需要传入年月日  但是对时间的加减操作比较麻烦

Calenda  加减比较方便 

 

 

 

使用 LocalDate、 LocalTime、 LocalDateTime


 

 LocalDate、 LocalTime、 LocalDateTIme 类的实例是不可变的对象。分别使用ISO-8601日历系统的日期、时间、日期和时间。他们提供了简单的日期或时间,并不包含当前的时间信息。也不包含与时区相关的信息。

  

他们的使用方式一一模一样,但是专一程度不一样。专门表示日期,专门表示时间,表示时间好日期

 

加减操作时候,有很多API可以使用的。根据情况场景自己选择。

加法操作

 减法操作:

 

 

 

 @Test
    public void test1(){
        //方式一
        LocalDateTime dateTime1 = LocalDateTime.now();
        System.out.println(dateTime1);

        //方式二
        LocalDateTime dateTime2 = LocalDateTime.of(2018, 05, 21, 13, 22, 33);
        System.out.println(dateTime2);

       //获取的操作
        System.out.println( dateTime1.getYear());
        System.out.println(dateTime1.getHour());
    }

 

 

 

以上是人读的,下面是计算机读的:

 

Instant: 时间戳

   Unix元年, 1970年1月1日00:00:00 到某个时间之间的毫秒值

  

   @Test
    public void test(){
        Instant now = Instant.now();  //默认是获取的 UTC 时区
        System.out.println(now);

        OffsetDateTime offsetDateTime = now.atOffset(ZoneOffset.ofHours(8));//相差8个时区的情况
        System.out.println(offsetDateTime);
        //各种属性值的获取
        System.out.println(now.getEpochSecond());
        //1000s
        Instant instant = Instant.ofEpochSecond(1000); //从unix时间开始加1000秒
        System.out.println(instant);
    }

补充:

API获取个各种属性

 

 

 计算两个时间的间隔:

  Duration: 计算两个时间之间的间隔

   Period: 计算两个日期之间的间隔

 

   @Test
    public void test3() throws InterruptedException {
       Instant now1 = Instant.now();
       Thread.sleep(1000);
       Instant now2 = Instant.now();
     //计算两个时间戳的间隔
       Duration between = Duration.between(now1, now2);
       System.out.println(between.getSeconds()); 
   

 

 

 这块儿API很多:

 

 

duration也有很多API可以调用的!可以做加减运算!

 

 @Test
    public void test3() throws InterruptedException {
       Instant now1 = Instant.now();
       Thread.sleep(1000);
       Instant now2 = Instant.now();
     //计算两个时间戳的间隔
       Duration between = Duration.between(now1, now2);
       System.out.println(between.getSeconds());

       LocalTime now3 = LocalTime.now();
       Thread.sleep(1000);
       LocalTime now4 = LocalTime.now();
       System.out.println(Duration.between(now3, now4).toMillis());
   }

 

日期的间隔:

 @Test
   public void test4(){
       LocalDate of = LocalDate.of(2016, 2, 5);
       LocalDate now = LocalDate.now();
       Period between = Period.between(now, of);
       System.out.println(between);
       System.out.println(between.getYears());
       System.out.println(between.getMonths());
   }

 

posted @ 2019-05-19 15:17 toov5 阅读(...) 评论(...) 编辑 收藏

基于STM32F1XX 、HAL库的OPT4001-Q1环境光传感器驱动应用C语言程序设计 OPT4001-Q1 的输出是半对数 的,具有 9 个二进制对数满量程照度范围,每个范围内具有高度线性响应,使得 PicoStar™ 型号的测量能力为 312.5μlux 至 84klux,USON 型号的测量能力为 400µlux 至 107klux。// 禁用中断(示例) 阅读详情

相关推荐

薛定谔 | 先导化合物优化与相互作用可视化

当获得针对某个靶点的先导分子后,想要在此基础上进行化学结构修饰。为了提升化学改造的成功率可以采用本教程方法进行结构虚拟改造/优化。每用薛定谔处理一个新任务,第一步必须创建新的project以方便日后管理。选项卡中修改工作路径(可以方便地找到输出文件)

药研猿的博客 2144

Java8中时间API

Java 8新的日期时间API包含: java.time – 包含值对象的基础包 java.time.chrono – 提供对不同的日历系统的访问。 java.time.format – 格式化和解析时间和日期 java.time.temporal – 包括底层框架和扩展特性 java.time.zone – 包含时区支持的类

Lifelong learning 1253

网络工程系统CAD图:从设计到落地的关键技能与实战指南

网络工程并不只是配置路由器和交换机,真正的核心在于将设计方案转化为可施工的物理图纸。网络工程系统CAD图正是连接逻辑设计与物理世界的桥梁,它涵盖综合布线、信息点布置、桥架路由、弱电间规划等关键内容。理解并掌握这套图纸体系,是网络工程师从基础设备调试走向项目主导者、弱电总工乃至网络架构师的重要分水岭。在园区网、数据中心、智能楼宇等真实场景中,一套规范的系统CAD图直接决定了施工质量、验收效率与后期运维的可靠性。本文从基础概念出发,拆解图纸的组成层次、绘制流程和软件工作流,并结合学习路线与就业方向,帮助初学者建

weixin_33860553的博客 391

【Java系列】Java 8 日期/时间 API 简介

Java 8 引入了新的日期和时间 API,以解决旧版和的缺点。在本教程中,我们从现有Date和CalendarAPI 中的问题开始,讨论新的 Java 8 日期和时间 API 如何解决这些问题。我们还将了解新 Java 8 项目的一些核心类,它们是 java.time 包的一部分,例如及其支持的 API。

Hyatt的博客 1431

Masta调用Geometry Modeller(Space Claim)进行根据三维模型快速建模设置方法

masta中调用ANSYS的space claim的设置方法

xifegnlie的博客 244

VisionMaster4.2.0与C#控件开发实战:从入门到精通的完整指南

本文详细介绍了VisionMaster4.2.0与C#控件开发的实战指南,从基础环境搭建到核心控件使用,再到高级功能实现。通过VmFrontendControl、VmGlobalToolControl等核心控件的深入解析,帮助开发者快速掌握机器视觉应用开发技巧,提升开发效率。特别适合需要集成VisionMaster4.2.0 SDK进行视觉系统开发的C#程序员。

weixin_42665725的博客 383

java8日期和时间API全解——更完善的日期和时间API

在 Java 8 之前,我们处理日期时间需求时,使用 Date、Calender 和 SimpleDateFormat,来声明时间戳、使用日历处理日期和格式化解析日期时间。但是,这些类的 API 的缺点比较明显,比如可读性差、易用性差、使用起来冗余繁琐,SimpleDateFormat还有线程安全问题。比如:年份的起始选择是1900年,月份的起始从0开始。// 它的打印输出效果为: Tue Mar 18 00 : 00 : 00 CET 2014。

秃了也弱了 2518

【SigmaStudio】自定义算法组件之源码规范(二)

工作中自定义算法组件一般是dll文件,生成dll文件需要XML文件和DLB文件,记录一下DLB文件代码的编码规范,定义SigmaStudio SHARC算法开发的编码规则,涵盖函数原型、内存管理、接口结构体等关键要求,确保算法模块与SigmaStudio环境兼容

liang_song的博客 1377

java8中的日期和时间API

java8中引入新的日期时间API,主要解决原来日期操作复杂,表示不清晰,线程不安全等问题。 日期创建 1. LocalDate和LocalTime //指定日期创建 LocalDate date = LocalDate.of(2019, 10, 20); System.out.println(date.getYear()); //2019 System.out.println(date.getM...

兴国-为梦想而战 3798

Arduino开发实例-EMG 肌肉信号传感器

在医学研究中,测量肌肉的活动、收缩和扩张非常重要。 EMG 肌肉传感器测量肌肉活动并产生信号以显示扩张和收缩量。 因此,输出取决于所选肌肉的活动量。 3 绿色、红色和黄色电极连接到模块,用于传输来自肌肉运动的电信号。

视觉与物联智能 1698

华为OD机试真题 新系统【查找能被整除的最大整数】

华为OD新系统机试真题【查找能被整除的最大整数】,提供C语言、Java、C++、Python、Go、JavaScript源码实现,并提供完整思路讲解,以及在线OJ模拟做题。华为OD机试真题【查找能被整除的最大整数】

qq_45776114的博客 672

Java 8常用时间 API

在Java 8中,Instant类用于表示时间戳,相当于旧的Date类;LocalDateTime类用于表示日期和时间,相当于旧的Calendar类;DateTimeFormatter类用于格式化日期和时间,相当于旧的SimpleDateFormat类

洪晓鸿 461

使用MATLAB和Simulink来创建一个智能家居照明控制系统的仿真模型

智能家居中的智能照明控制系统旨在通过自动化手段优化家庭照明,提高能源效率和居住舒适度。这通常涉及传感器(如光敏传感器、运动传感器)、控制器(如微控制器或PLC)以及执行器(如调光器或开关)。在这个教程中,我们将使用MATLAB和Simulink来创建一个智能家居照明控制系统的仿真模型。

xiaoheshang_123的博客 220

Java8——新时间日期API

问题  老的时间日期API都存在线程安全问题,因为它们的实例的值都是可变的,多个线程操作同一个实例的时候就会产生线程安全问题。新的时间日期API解决了这个问题,每次改变值都会新创建一个时间日期等实例对象,这样就不存在多个线程操作同一个对象的问题,也就避免了线程安全问题。新的时间日期API都在java.time包下,该包下的实例都是不可变的,也就是说只要变化就会产生新的实例,类似于String,避免...

如不來的博客 554

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

Java 8 时间日期 API

Java 8 时间日期 API /*** * LocalDate:表示不带时间的日期 * LocalTime:表示不带日期的时间 * LocalDateTime:日期和时间类 * ZoneId:时区 * ZonedDateTime:一个带时区的完整时间 * Instant:Unix 时间,它代表的是时间戳,比如 20...

. 451

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

java8出的新的时间日期API

java8出的新的时间日期API都是线程安全的,并且性能更好,代码更简洁! 新时间日期API常用、重要对象介绍 ZoneId: 时区ID,用来确定Instant和LocalDateTime互相转换的规则 Instant: 用来表示时间线上的一个点(瞬时) LocalDate: 表示没有时区的日期, LocalDate是不可变并且线程安全的 LocalTime: 表示没有时区的时间, LocalTi...

tranquil 460

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

Java8新特性时间日期库DateTime API及示例

Java8新特性的功能已经更新了不少篇幅了,今天重点讲解时间日期库中DateTime相关处理。同样的,如果你现在依旧在项目中使用传统Date、Calendar和SimpleDateFormat等API来处理日期相关操作,这篇文章你一定不要错过。来刷新你的知识库吧! 背景 Java对日期、日历及时间的处理一直以来都饱受诟病,比如java.util.Date和java.util.Calendar类易用...

程序新视界 4672

java8 详解时间日期API

在使用java8以前的时间日期类的时候,总觉得这一块有点蹩脚: java.util.Date和java.sql.Date,不知道为啥定义两个同名的类,而且后者还没有默认的构造方法; 日期类格式化类SimpleDateFormat居然是在java.text包下; 推荐实用Calendar获取Date对象的年月日时分秒,不过从名字上很难感觉到两者之间有什么关联。 还有一些其他的问题我不再一一说明了,下面是从网上找到的关于时间日期类的问题总结: 非线程安全:java.util.Date、java.util.

龚厂长的博客 493

Java8 新特性 之 新时间日期 API

目录 Java8 新特性 之 Lambda表达式 Java8 新特性 之 函数式接口 Java8 新特性 之 方法引用与构造器引用 Java8 新特性 之 Stream API Java8 新特性 之 新时间日期 API Java8中的LocalDateTime 工具使用 Java8 新特性 之 接口中的默认方法与静态方法 Java8 新特性 之 其他新特性 Java8 新特性 ...

超人不会飞 539

Java8的Optional、时间日期API

Java8的Optional和时间日期API

enterprises的博客 456

Java8之新时间日期API

1.LocalDate、LocalTime、LocalDateTime LocalDate、LocalTime、LocalDateTime类的实例是不可变的对象,分别表示使用ISO-8601日历系统的日期、时间、日期和时间。它们提供了简单的日期或时间,并不包含当前的时间信息,也不包含与时区相关的信息。 2.Instant时间戳 3.Duration和Period Duration:用于计算两个“时间”间隔 Period:用于计算两个“日期”间隔 4.日期的操纵 TemporalAdjuster:时间校正器,

Alisa的博客 247

[Java8新特性]:新时间日期API

新时间日期API (1)、java.time包构成 java.time:包含值对象的基础包 java.time.chrono:提供对不同的日历系统的访问 java.time.format:格式化和解析时间和日期 java.time.temporal:包括底层框架和扩展特性 java.time.zone:包含时区支持的类 (2)、java.time 本地日期时间类 LocalDate...

胖子 308

Java8新特性(八)——时间日期API

八、时间日期API 1.LocalDate 、LocalTime 、LocalDateTime LocalDate、LocalTime、LocalDateTime 类的实例是不可变的对象,分别表示使用 ISO-8601日历系统的日期、时间、日期和时间。它们提供了简单的日期或时间,并不包含当前的时间信息。也不包含与时区相关的信息。 常用方法: 方法 描述 now() 静态方法,根...

qq_39769154的博客 384

java datetime_Java8新特性时间日期库DateTime API及示例详解

Java8新特性的功能已经更新了不少篇幅了,今天重点讲解时间日期库中DateTime相关处理。同样的,如果你现在依旧在项目中使用传统Date、Calendar和SimpleDateFormat等API来处理日期相关操作,这篇文章你一定不要错过。来刷新你的知识库吧!背景Java对日期、日历及时间的处理一直以来都饱受诟病,比如java.util.Date和java.util.Calendar类易用性差...

weixin_29608135的博客 373

java日期库_Java8新特性时间日期库DateTime API及示例

Java8新特性的功能已经更新了不少篇幅了,今天重点讲解时间日期库中DateTime相关处理。同样的,如果你现在依旧在项目中使用传统Date、Calendar和SimpleDateFormat等API来处理日期相关操作,这篇文章你一定不要错过。来刷新你的知识库吧!背景Java对日期、日历及时间的处理一直以来都饱受诟病,比如java.util.Date和java.util.Calendar类易用性差...

weixin_42153793的博客 123

Java8新特性——新时间日期API

Java8新特性——新时间日期API 在Java8之前,时间日期API存在线程安全的问题,多线程情况下需要加锁,并且使用起来也比较不方便。Java8为我们提供了新的时间日期API。这篇文章,我们一起来使用下。 1. 使用LocalDate、LocalTime、LocalDateTime LocalDate、 LocalTime、 LocalDateTime类的实例是不可变的对象,分别表示使用I...

XUDC的程序人生 1936
上一篇: Java8
下一篇: 代理类和AOP
Art&Code
博客等级 码龄7年 77粉丝 554原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值