Package org.joda.time

Class DateTimeConstants

java.lang.Object
org.joda.time.DateTimeConstants

public class DateTimeConstants extends Object
DateTimeConstants is a non-instantiable class of constants used in the date time system. These are the ISO8601 constants, but should be used by all chronologies.

DateTimeConstants is thread-safe and immutable.

Since:
1.0
Author:
Stephen Colebourne, Brian S O'Neill
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Constant (1) representing AD, years after zero (from Calendar).
    static final int
    Constant (0) representing AM, the morning (from Calendar)
    static final int
    Constant (4) representing April, the fourth month (ISO)
    static final int
    Constant (8) representing August, the eighth month (ISO)
    static final int
    Constant (0) representing BC, years before zero (from Calendar)
    static final int
    Alternative constant (0) representing BCE, Before Common Era (secular)
    static final int
    Alternative constant (1) representing CE, Common Era (secular).
    static final int
    Days in one week (7) (ISO)
    static final int
    Constant (12) representing December, the twelfth month (ISO)
    static final int
    Constant (2) representing February, the second month (ISO)
    static final int
    Constant (5) representing Friday, the fifth day of the week (ISO)
    static final int
    Hours in a typical day (24) (ISO).
    static final int
    Hours in a typical week.
    static final int
    Constant (1) representing January, the first month (ISO)
    static final int
    Constant (7) representing July, the seventh month (ISO)
    static final int
    Constant (6) representing June, the sixth month (ISO)
    static final int
    Constant (3) representing March, the third month (ISO)
    static final int
    Constant (5) representing May, the fifth month (ISO)
    static final int
    Milliseconds in a typical day (ISO).
    static final int
    Milliseconds in one hour (ISO)
    static final int
    Milliseconds in one minute (ISO)
    static final int
    Milliseconds in one second (1000) (ISO)
    static final int
    Milliseconds in a typical week (ISO).
    static final int
    Minutes in a typical day (ISO).
    static final int
    Minutes in one hour (ISO)
    static final int
    Minutes in a typical week (ISO).
    static final int
    Constant (1) representing Monday, the first day of the week (ISO)
    static final int
    Constant (11) representing November, the eleventh month (ISO)
    static final int
    Constant (10) representing October, the tenth month (ISO)
    static final int
    Constant (1) representing PM, the afternoon (from Calendar)
    static final int
    Constant (6) representing Saturday, the sixth day of the week (ISO)
    static final int
    Seconds in a typical day (ISO).
    static final int
    Seconds in one hour (ISO)
    static final int
    Seconds in one minute (60) (ISO)
    static final int
    Seconds in a typical week (ISO).
    static final int
    Constant (9) representing September, the nineth month (ISO)
    static final int
    Constant (7) representing Sunday, the seventh day of the week (ISO)
    static final int
    Constant (4) representing Thursday, the fourth day of the week (ISO)
    static final int
    Constant (2) representing Tuesday, the second day of the week (ISO)
    static final int
    Constant (3) representing Wednesday, the third day of the week (ISO)
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Restrictive constructor
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • JANUARY

      public static final int JANUARY
      Constant (1) representing January, the first month (ISO)
      See Also:
    • FEBRUARY

      public static final int FEBRUARY
      Constant (2) representing February, the second month (ISO)
      See Also:
    • MARCH

      public static final int MARCH
      Constant (3) representing March, the third month (ISO)
      See Also:
    • APRIL

      public static final int APRIL
      Constant (4) representing April, the fourth month (ISO)
      See Also:
    • MAY

      public static final int MAY
      Constant (5) representing May, the fifth month (ISO)
      See Also:
    • JUNE

      public static final int JUNE
      Constant (6) representing June, the sixth month (ISO)
      See Also:
    • JULY

      public static final int JULY
      Constant (7) representing July, the seventh month (ISO)
      See Also:
    • AUGUST

      public static final int AUGUST
      Constant (8) representing August, the eighth month (ISO)
      See Also:
    • SEPTEMBER

      public static final int SEPTEMBER
      Constant (9) representing September, the nineth month (ISO)
      See Also:
    • OCTOBER

      public static final int OCTOBER
      Constant (10) representing October, the tenth month (ISO)
      See Also:
    • NOVEMBER

      public static final int NOVEMBER
      Constant (11) representing November, the eleventh month (ISO)
      See Also:
    • DECEMBER

      public static final int DECEMBER
      Constant (12) representing December, the twelfth month (ISO)
      See Also:
    • MONDAY

      public static final int MONDAY
      Constant (1) representing Monday, the first day of the week (ISO)
      See Also:
    • TUESDAY

      public static final int TUESDAY
      Constant (2) representing Tuesday, the second day of the week (ISO)
      See Also:
    • WEDNESDAY

      public static final int WEDNESDAY
      Constant (3) representing Wednesday, the third day of the week (ISO)
      See Also:
    • THURSDAY

      public static final int THURSDAY
      Constant (4) representing Thursday, the fourth day of the week (ISO)
      See Also:
    • FRIDAY

      public static final int FRIDAY
      Constant (5) representing Friday, the fifth day of the week (ISO)
      See Also:
    • SATURDAY

      public static final int SATURDAY
      Constant (6) representing Saturday, the sixth day of the week (ISO)
      See Also:
    • SUNDAY

      public static final int SUNDAY
      Constant (7) representing Sunday, the seventh day of the week (ISO)
      See Also:
    • AM

      public static final int AM
      Constant (0) representing AM, the morning (from Calendar)
      See Also:
    • PM

      public static final int PM
      Constant (1) representing PM, the afternoon (from Calendar)
      See Also:
    • BC

      public static final int BC
      Constant (0) representing BC, years before zero (from Calendar)
      See Also:
    • BCE

      public static final int BCE
      Alternative constant (0) representing BCE, Before Common Era (secular)
      See Also:
    • CE

      public static final int CE
      Alternative constant (1) representing CE, Common Era (secular).

      All new chronologies with different Era values should try to assign eras as follows. The era that was in force at 1970-01-01 (ISO) is assigned the value 1. Earlier eras are assigned sequentially smaller numbers. Later eras are assigned sequentially greater numbers.

      See Also:
    • MILLIS_PER_SECOND

      public static final int MILLIS_PER_SECOND
      Milliseconds in one second (1000) (ISO)
      See Also:
    • SECONDS_PER_MINUTE

      public static final int SECONDS_PER_MINUTE
      Seconds in one minute (60) (ISO)
      See Also:
    • MILLIS_PER_MINUTE

      public static final int MILLIS_PER_MINUTE
      Milliseconds in one minute (ISO)
      See Also:
    • MINUTES_PER_HOUR

      public static final int MINUTES_PER_HOUR
      Minutes in one hour (ISO)
      See Also:
    • SECONDS_PER_HOUR

      public static final int SECONDS_PER_HOUR
      Seconds in one hour (ISO)
      See Also:
    • MILLIS_PER_HOUR

      public static final int MILLIS_PER_HOUR
      Milliseconds in one hour (ISO)
      See Also:
    • HOURS_PER_DAY

      public static final int HOURS_PER_DAY
      Hours in a typical day (24) (ISO). Due to time zone offset changes, the number of hours per day can vary.
      See Also:
    • MINUTES_PER_DAY

      public static final int MINUTES_PER_DAY
      Minutes in a typical day (ISO). Due to time zone offset changes, the number of minutes per day can vary.
      See Also:
    • SECONDS_PER_DAY

      public static final int SECONDS_PER_DAY
      Seconds in a typical day (ISO). Due to time zone offset changes, the number of seconds per day can vary.
      See Also:
    • MILLIS_PER_DAY

      public static final int MILLIS_PER_DAY
      Milliseconds in a typical day (ISO). Due to time zone offset changes, the number of milliseconds per day can vary.
      See Also:
    • DAYS_PER_WEEK

      public static final int DAYS_PER_WEEK
      Days in one week (7) (ISO)
      See Also:
    • HOURS_PER_WEEK

      public static final int HOURS_PER_WEEK
      Hours in a typical week. Due to time zone offset changes, the number of hours per week can vary.
      See Also:
    • MINUTES_PER_WEEK

      public static final int MINUTES_PER_WEEK
      Minutes in a typical week (ISO). Due to time zone offset changes, the number of minutes per week can vary.
      See Also:
    • SECONDS_PER_WEEK

      public static final int SECONDS_PER_WEEK
      Seconds in a typical week (ISO). Due to time zone offset changes, the number of seconds per week can vary.
      See Also:
    • MILLIS_PER_WEEK

      public static final int MILLIS_PER_WEEK
      Milliseconds in a typical week (ISO). Due to time zone offset changes, the number of milliseconds per week can vary.
      See Also:
  • Constructor Details

    • DateTimeConstants

      protected DateTimeConstants()
      Restrictive constructor