| Modifier and Type | Field and Description |
|---|---|
static int |
MONTH_COUNT
一年的月数
|
| Constructor and Description |
|---|
Year()
默认当年
|
Year(Calendar calendar)
通过日历初始化
|
Year(Date date)
通过日期初始化
|
Year(int year)
通过年初始化
|
| Modifier and Type | Method and Description |
|---|---|
String |
build(boolean... args)
构建字符串内容
|
static Solar.Year |
from(Calendar calendar)
通过指定日历获取阳历年
|
static Solar.Year |
from(Date date)
通过指定日期获取阳历年
|
static Solar.Year |
from(int year)
通过指定年份获取阳历年
|
List<Solar.Month> |
getMonths()
获取本年的阳历月列表
|
int |
getYear()
获取年
|
Solar.Year |
next(int years)
获取往后推几年的阳历年,如果要往前推,则年数用负数
|
public static final int MONTH_COUNT
public Year()
public Year(Date date)
date - 日期public Year(Calendar calendar)
calendar - 日历public Year(int year)
year - 年public static Solar.Year from(Date date)
date - 日期public static Solar.Year from(Calendar calendar)
calendar - 日历public static Solar.Year from(int year)
year - 年public int getYear()
public List<Solar.Month> getMonths()
public Solar.Year next(int years)
years - 年数public String build(boolean... args)
args - 可选参数-简化输出Copyright © 2021. All rights reserved.