当前位置:网站首页>LocalDate addition and subtraction operations and comparison size
LocalDate addition and subtraction operations and comparison size
2022-07-31 03:32:00 【UlricaQ】
LocalDate for addition and subtraction, code and results:
Code:
public void test() {LocalDate today = LocalDate.now();System.out.println("today:"+today);// today plus five daysLocalDate plusDays = today.plusDays(5);System.out.println("today plus 5 days: "+plusDays);// today minus 5 daysLocalDate minusDays = today.minusDays(5);System.out.println("today minus 5 days: "+minusDays);// Determine if today is before plusDays, return a boolean valueboolean before = today.isBefore(plusDays);System.out.println("Determine whether today is before plusDays: "+before);boolean after = today.isAfter(plusDays);System.out.println("Determine whether today is after plusDays: "+after);// Compare today and plusDays, the result returns the value of today-plusDaysint i = today.compareTo(plusDays);System.out.println("Today and plusDays compare the size: "+ i);}边栏推荐
- 【HCIP】ISIS
- Distributed locks and three implementation methods
- Web container and IIS --- Middleware penetration method 1
- 安全20220722
- 数据库文件中的未分配的块和未使用的块的区别
- Based on the local, linking the world | Schneider Electric "Industrial SI Alliance" joins hands with partners to go to the future industry
- IDEA comment report red solution
- SIP协议标准和实现机制
- Daily practice of LeetCode - 138. Copy a linked list with random pointers
- Observer pattern
猜你喜欢

识Flutter 基本组件之showTimePicker 方法

Safety 20220712

web容器及IIS --- 中间件渗透方法1
![[Compilation principle] Design principle and implementation of recursive descent parsing](/img/51/cd054a8246dc108520d6ff9ea26c60.png)
[Compilation principle] Design principle and implementation of recursive descent parsing

SIP协议标准和实现机制

A brief introduction to the CheckboxListTile component of the basic components of Flutter

What is a system?

Recursive query single table - single table tree structure - (self-use)

MP使用时的几个常见报错

STM32问题合集
随机推荐
Addition and Subtraction of Scores in LeetCode Medium Questions
[Dynamic programming] Maximum sum of consecutive subarrays
els block to the left to move the conditional judgment
IIR filter and FIR filter
Redis实现分布式锁
(线段树) 基础线段树常见问题总结
Redis implements distributed locks
What is a system?
WebSocket Session为null
Ambiguous method call.both
The use of beforeDestroy and destroyed
Select the smoke test case, and make the first pass for the product package entering QA
SIP Protocol Standard and Implementation Mechanism
MultipartFile文件上传
Annotation usage meaning
Recursive query single table - single table tree structure - (self-use)
$parent/$children 与 ref
【编译原理】递归下降语法分析设计原理与实现
SonarQube的BUG定义
浅识Flutter 基本组件之showDatePicker方法
