public static enum Fields.Month extends Enum<Fields.Month>
| Enum Constant and Description |
|---|
Apr
四月
|
Aug
八月
|
Dec
十二月
|
Feb
二月
|
Jan
一月
|
Jul
七月
|
Jun
六月
|
Mar
三月
|
May
五月
|
Nov
十一月
|
Oct
十月
|
Sep
九月
|
Und
十三月,仅用于农历
|
| Modifier and Type | Method and Description |
|---|---|
static Fields.Month |
getByCode(int code)
根据code查询月份名称枚举
|
String |
getCnName() |
String |
getEnName() |
static String |
getFullNameCnByCode(int code)
根据code查询月份中文全称
|
static String |
getFullNameEnByCode(int code)
根据code查询月份英文全称
|
int |
getKey() |
int |
getLastDay(boolean isLeapYear)
获取此月份最后一天的值,不支持的月份(例如UNDECIMBER)返回-1
|
static int |
getLastDay(int month,
boolean isLeapYear)
获得指定月的最后一天
|
String |
getShortName() |
static String |
getShortNameCnByCode(int code)
根据code查询月份中文
|
static String |
getShortNameEnByCode(int code)
根据code查询月份英文简称
|
static Fields.Month |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Fields.Month[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Fields.Month Jan
public static final Fields.Month Feb
public static final Fields.Month Mar
public static final Fields.Month Apr
public static final Fields.Month May
public static final Fields.Month Jun
public static final Fields.Month Jul
public static final Fields.Month Aug
public static final Fields.Month Sep
public static final Fields.Month Oct
public static final Fields.Month Nov
public static final Fields.Month Dec
public static final Fields.Month Und
public static Fields.Month[] values()
for (Fields.Month c : Fields.Month.values()) System.out.println(c);
public static Fields.Month 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 static Fields.Month getByCode(int code)
code - codepublic static String getShortNameEnByCode(int code)
code - codepublic static String getFullNameEnByCode(int code)
code - codepublic static String getFullNameCnByCode(int code)
code - codepublic static String getShortNameCnByCode(int code)
code - codepublic static int getLastDay(int month,
boolean isLeapYear)
month - 月份isLeapYear - 是否为闰年,闰年只对二月有影响public int getLastDay(boolean isLeapYear)
isLeapYear - 是否闰年public int getKey()
public String getEnName()
public String getCnName()
public String getShortName()
Copyright © 2022. All rights reserved.