org.joda.time

Class DateTimeConstants


public class DateTimeConstants
extends java.lang.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.

Authors:
Stephen Colebourne
Brian S O'Neill
Since:
1.0

Field Summary

static int
AD
Constant (1) representing AD, years after zero (from Calendar).
static int
AM
Constant (0) representing AM, the morning (from Calendar)
static int
APRIL
Constant (4) representing April, the fourth month (ISO)
static int
AUGUST
Constant (8) representing August, the eighth month (ISO)
static int
BC
Constant (0) representing BC, years before zero (from Calendar)
static int
BCE
Alternative constant (0) representing BCE, Before Common Era (secular)
static int
CE
Alternative constant (1) representing CE, Common Era (secular).
static int
DAYS_PER_WEEK
Days in one week (7) (ISO)
static int
DECEMBER
Constant (12) representing December, the twelfth month (ISO)
static int
FEBRUARY
Constant (2) representing February, the second month (ISO)
static int
FRIDAY
Constant (5) representing Friday, the fifth day of the week (ISO)
static int
HOURS_PER_DAY
Hours in a typical day (24) (ISO).
static int
HOURS_PER_WEEK
Hours in a typical week.
static int
JANUARY
Constant (1) representing January, the first month (ISO)
static int
JULY
Constant (7) representing July, the seventh month (ISO)
static int
JUNE
Constant (6) representing June, the sixth month (ISO)
static int
MARCH
Constant (3) representing March, the third month (ISO)
static int
MAY
Constant (5) representing May, the fifth month (ISO)
static int
MILLIS_PER_DAY
Milliseconds in a typical day (ISO).
static int
MILLIS_PER_HOUR
Milliseconds in one hour (ISO)
static int
MILLIS_PER_MINUTE
Milliseconds in one minute (ISO)
static int
MILLIS_PER_SECOND
Milliseconds in one second (1000) (ISO)
static int
MILLIS_PER_WEEK
Milliseconds in a typical week (ISO).
static int
MINUTES_PER_DAY
Minutes in a typical day (ISO).
static int
MINUTES_PER_HOUR
Minutes in one hour (ISO)
static int
MINUTES_PER_WEEK
Minutes in a typical week (ISO).
static int
MONDAY
Constant (1) representing Monday, the first day of the week (ISO)
static int
NOVEMBER
Constant (11) representing November, the eleventh month (ISO)
static int
OCTOBER
Constant (10) representing October, the tenth month (ISO)
static int
PM
Constant (1) representing PM, the afternoon (from Calendar)
static int
SATURDAY
Constant (6) representing Saturday, the sixth day of the week (ISO)
static int
SECONDS_PER_DAY
Seconds in a typical day (ISO).
static int
SECONDS_PER_HOUR
Seconds in one hour (ISO)
static int
SECONDS_PER_MINUTE
Seconds in one minute (60) (ISO)
static int
SECONDS_PER_WEEK
Seconds in a typical week (ISO).
static int
SEPTEMBER
Constant (9) representing September, the nineth month (ISO)
static int
SUNDAY
Constant (7) representing Sunday, the seventh day of the week (ISO)
static int
THURSDAY
Constant (4) representing Thursday, the fourth day of the week (ISO)
static int
TUESDAY
Constant (2) representing Tuesday, the second day of the week (ISO)
static int
WEDNESDAY
Constant (3) representing Wednesday, the third day of the week (ISO)

Constructor Summary

DateTimeConstants()
Restrictive constructor

Field Details

AM

public static final int AM
Constant (0) representing AM, the morning (from Calendar)
Field Value:
0

APRIL

public static final int APRIL
Constant (4) representing April, the fourth month (ISO)
Field Value:
4

AUGUST

public static final int AUGUST
Constant (8) representing August, the eighth month (ISO)
Field Value:
8

BC

public static final int BC
Constant (0) representing BC, years before zero (from Calendar)
Field Value:
0

BCE

public static final int BCE
Alternative constant (0) representing BCE, Before Common Era (secular)
Field Value:
0

CE

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

All new chronologies with differrent 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.

Field Value:
1

DAYS_PER_WEEK

public static final int DAYS_PER_WEEK
Days in one week (7) (ISO)
Field Value:
7

DECEMBER

public static final int DECEMBER
Constant (12) representing December, the twelfth month (ISO)
Field Value:
12

FEBRUARY

public static final int FEBRUARY
Constant (2) representing February, the second month (ISO)
Field Value:
2

FRIDAY

public static final int FRIDAY
Constant (5) representing Friday, the fifth day of the week (ISO)
Field Value:
5

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.
Field Value:
24

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.
Field Value:
168

JANUARY

public static final int JANUARY
Constant (1) representing January, the first month (ISO)
Field Value:
1

JULY

public static final int JULY
Constant (7) representing July, the seventh month (ISO)
Field Value:
7

JUNE

public static final int JUNE
Constant (6) representing June, the sixth month (ISO)
Field Value:
6

MARCH

public static final int MARCH
Constant (3) representing March, the third month (ISO)
Field Value:
3

MAY

public static final int MAY
Constant (5) representing May, the fifth month (ISO)
Field Value:
5

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.
Field Value:
86400000

MILLIS_PER_HOUR

public static final int MILLIS_PER_HOUR
Milliseconds in one hour (ISO)
Field Value:
3600000

MILLIS_PER_MINUTE

public static final int MILLIS_PER_MINUTE
Milliseconds in one minute (ISO)
Field Value:
60000

MILLIS_PER_SECOND

public static final int MILLIS_PER_SECOND
Milliseconds in one second (1000) (ISO)
Field Value:
1000

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.
Field Value:
604800000

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.
Field Value:
1440

MINUTES_PER_HOUR

public static final int MINUTES_PER_HOUR
Minutes in one hour (ISO)
Field Value:
60

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.
Field Value:
10080

MONDAY

public static final int MONDAY
Constant (1) representing Monday, the first day of the week (ISO)
Field Value:
1

NOVEMBER

public static final int NOVEMBER
Constant (11) representing November, the eleventh month (ISO)
Field Value:
11

OCTOBER

public static final int OCTOBER
Constant (10) representing October, the tenth month (ISO)
Field Value:
10

PM

public static final int PM
Constant (1) representing PM, the afternoon (from Calendar)
Field Value:
1

SATURDAY

public static final int SATURDAY
Constant (6) representing Saturday, the sixth day of the week (ISO)
Field Value:
6

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.
Field Value:
86400

SECONDS_PER_HOUR

public static final int SECONDS_PER_HOUR
Seconds in one hour (ISO)
Field Value:
3600

SECONDS_PER_MINUTE

public static final int SECONDS_PER_MINUTE
Seconds in one minute (60) (ISO)
Field Value:
60

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.
Field Value:
604800

SEPTEMBER

public static final int SEPTEMBER
Constant (9) representing September, the nineth month (ISO)
Field Value:
9

SUNDAY

public static final int SUNDAY
Constant (7) representing Sunday, the seventh day of the week (ISO)
Field Value:
7

THURSDAY

public static final int THURSDAY
Constant (4) representing Thursday, the fourth day of the week (ISO)
Field Value:
4

TUESDAY

public static final int TUESDAY
Constant (2) representing Tuesday, the second day of the week (ISO)
Field Value:
2

WEDNESDAY

public static final int WEDNESDAY
Constant (3) representing Wednesday, the third day of the week (ISO)
Field Value:
3

Constructor Details

DateTimeConstants

protected DateTimeConstants()
Restrictive constructor

Copyright (c) 2001-2006 - Joda.org