Enum Class Fields.Month

java.lang.Object
java.lang.Enum<Fields.Month>
org.aoju.bus.core.lang.Fields.Month
All Implemented Interfaces:
Serializable, Comparable<Fields.Month>, Constable
Enclosing class:
Fields

public static enum Fields.Month extends Enum<Fields.Month>
月份枚举 与Calendar中的月份int值对应
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static Fields.Month[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Fields.Month valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getByCode

      public static Fields.Month getByCode(int code)
      根据code查询月份名称枚举
      Parameters:
      code - code
      Returns:
      this
    • getShortNameEnByCode

      public static String getShortNameEnByCode(int code)
      根据code查询月份英文简称
      Parameters:
      code - code
      Returns:
      String
    • getFullNameEnByCode

      public static String getFullNameEnByCode(int code)
      根据code查询月份英文全称
      Parameters:
      code - code
      Returns:
      String
    • getFullNameCnByCode

      public static String getFullNameCnByCode(int code)
      根据code查询月份中文全称
      Parameters:
      code - code
      Returns:
      String
    • getShortNameCnByCode

      public static String getShortNameCnByCode(int code)
      根据code查询月份中文
      Parameters:
      code - code
      Returns:
      String
    • getLastDay

      public static int getLastDay(int month, boolean isLeapYear)
      获得指定月的最后一天
      Parameters:
      month - 月份
      isLeapYear - 是否为闰年,闰年只对二月有影响
      Returns:
      最后一天,可能为28,29,30,31
    • getLastDay

      public int getLastDay(boolean isLeapYear)
      获取此月份最后一天的值,不支持的月份(例如UNDECIMBER)返回-1
      Parameters:
      isLeapYear - 是否闰年
      Returns:
      此月份最后一天的值
    • getKey

      public int getKey()
    • getEnName

      public String getEnName()
    • getCnName

      public String getCnName()
    • getShortName

      public String getShortName()