本文介绍了Java:检查当前日期是否在特定日期范围内的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
根据这一点,我想构建一个特定的JSON检索目前的学期。
我在夏季学期的冬季有一个非常具体的范围:
我将如何查看使用哪些学期的间隔?
解决方案
为每个日期创建日历对象,设置其字段,使用日历的前后方法确定当前日期属于哪个范围
I am trying to determine in Java whether the current date is within either winter or summer semester.
Based on this I want to construct a specific JSON retrieval of the current semester.
I have a very specific range for both winter an summer semester:
How would i go about checking which semesters interval to use?
解决方案
Create Calendar objects for each date, set their fields, use Calendar's before and after methods to determine which range current date belongs to
这篇关于Java:检查当前日期是否在特定日期范围内的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!