判断两个LocalDateTime大小
时间: 2023-10-14 19:03:58 浏览: 103
要判断两个LocalDateTime的大小,可以使用isBefore和isAfter方法。isBefore(LocalDateTime)方法可判断当前的LocalDateTime时间在参数的LocalDateTime之后,而isAfter(LocalDateTime)方法可判断当前的LocalDateTime时间在参数的LocalDateTime之前。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [java比较两个日期时间,比较两个日期大小](https://blog.csdn.net/weixin_46633487/article/details/115769203)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [LocalDateTime 比较大小,计算两个LocalDateTime的时间差时分秒](https://blog.csdn.net/qq_42831771/article/details/123557664)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文