public enum DateField extends Enum<DateField>
Enum Constant and Description |
---|
AM_PM
上午或者下午
|
DAY_OF_MONTH
一月中的第几天
|
DAY_OF_WEEK
周几,1表示周日,2表示周一
|
DAY_OF_WEEK_IN_MONTH
天所在的周是这个月的第几周
|
DAY_OF_YEAR
一年中的第几天
|
ERA
世纪
|
HOUR
小时,用于12小时制
|
HOUR_OF_DAY
小时,用于24小时制
|
MILLISECOND
毫秒
|
MINUTE
分钟
|
MONTH
月
|
SECOND
秒
|
WEEK_OF_MONTH
一月中第几周
|
WEEK_OF_YEAR
一年中第几周
|
YEAR
年
|
Modifier and Type | Method and Description |
---|---|
int |
getValue() |
static DateField |
of(int calendarPartIntValue)
将
Calendar 相关值转换为DatePart枚举对象 |
static DateField |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DateField[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DateField ERA
Calendar.ERA
public static final DateField YEAR
Calendar.YEAR
public static final DateField MONTH
Calendar.MONTH
public static final DateField WEEK_OF_YEAR
Calendar.WEEK_OF_YEAR
public static final DateField WEEK_OF_MONTH
Calendar.WEEK_OF_MONTH
public static final DateField DAY_OF_MONTH
Calendar.DAY_OF_MONTH
public static final DateField DAY_OF_YEAR
Calendar.DAY_OF_YEAR
public static final DateField DAY_OF_WEEK
Calendar.DAY_OF_WEEK
public static final DateField DAY_OF_WEEK_IN_MONTH
Calendar.DAY_OF_WEEK_IN_MONTH
public static final DateField AM_PM
Calendar.AM_PM
public static final DateField HOUR
Calendar.HOUR
public static final DateField HOUR_OF_DAY
Calendar.HOUR
public static final DateField MINUTE
Calendar.MINUTE
public static final DateField SECOND
Calendar.SECOND
public static final DateField MILLISECOND
Calendar.MILLISECOND
public static DateField[] values()
for (DateField c : DateField.values()) System.out.println(c);
public static DateField valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getValue()
Copyright © 2024. All rights reserved.