Package | Description |
---|---|
cn.hutool.core.date |
日期封装,日期的核心为DateTime类,DateUtil提供日期操作的入口
|
Modifier and Type | Method and Description |
---|---|
YearQuarter |
Quarter.atYear(int year)
根据指定的年份,获取一个新的 YearQuarter 实例
此方法允许在保持当前季度信息不变的情况下,更改年份
|
YearQuarter |
YearQuarter.lastQuarter()
上一个季度
|
YearQuarter |
YearQuarter.lastYear()
上一年同季度
|
YearQuarter |
YearQuarter.minusQuarters(long quartersToMinus)
减去季度
|
YearQuarter |
YearQuarter.minusYears(long yearsToMinus)
减去年份
|
YearQuarter |
YearQuarter.nextQuarter()
下一个季度
|
YearQuarter |
YearQuarter.nextYear()
下一年同季度
|
static YearQuarter |
YearQuarter.now()
当前年季
|
static YearQuarter |
YearQuarter.of(Calendar date)
根据指定日期,判断日期所在的年份与季度,创建
YearQuarter 实例 |
static YearQuarter |
YearQuarter.of(Date date)
根据指定日期,判断日期所在的年份与季度,创建
YearQuarter 实例 |
static YearQuarter |
YearQuarter.of(int year,
int quarter)
根据指定年份与季度,创建
YearQuarter 实例 |
static YearQuarter |
YearQuarter.of(int year,
Quarter quarter)
根据指定年份与季度,创建
YearQuarter 实例 |
static YearQuarter |
YearQuarter.of(LocalDate date)
根据指定日期,判断日期所在的年份与季度,创建
YearQuarter 实例 |
static YearQuarter |
YearQuarter.of(YearMonth yearMonth)
根据指定年月,判断其所在的年份与季度,创建
YearQuarter 实例 |
YearQuarter |
YearQuarter.plusQuarters(long quartersToAdd)
添加季度
|
YearQuarter |
YearQuarter.plusYears(long yearsToAdd)
添加年份
|
Modifier and Type | Method and Description |
---|---|
int |
YearQuarter.compareTo(YearQuarter other) |
boolean |
YearQuarter.isAfter(YearQuarter other)
判断是否在指定年份季度之后
|
boolean |
YearQuarter.isBefore(YearQuarter other)
判断是否在指定年份季度之前
|
Copyright © 2025. All rights reserved.