Class ThreeSixtyDayChronology
- java.lang.Object
-
- org.joda.time.Chronology
-
- org.joda.time.chrono.BaseChronology
-
- uk.ac.rdg.resc.edal.util.chronologies.ThreeSixtyDayChronology
-
- All Implemented Interfaces:
Serializable
public final class ThreeSixtyDayChronology extends org.joda.time.chrono.BaseChronology
A Chronology in which each year has exactly 360 days of 12 equal months ( i.e. each month has exactly 30 days). This calendar system is used in many climate simulations. There are no leap years.
In this Chronology, a millisecond instant of zero corresponds with 1970-01-01T00:00:00.000Z and a year has a fixed number of milliseconds (1000*60*60*24*360).
There is no concept of an era in this calendar, so all durations and fields relating to this concept are not supported. Additionally, the concept of a "weekyear" (the year that "owns" a given week) is not implemented.
Instances of this class can only be created in
DateTimeZone.UTC
. (Support for time zones makes little sense in this chronology).Instances of this class are immutable.
- Author:
- Jon Blower
- See Also:
- CF conventions, Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.joda.time.DurationField
centuries()
org.joda.time.DateTimeField
clockhourOfDay()
org.joda.time.DateTimeField
clockhourOfHalfday()
org.joda.time.DateTimeField
dayOfMonth()
org.joda.time.DateTimeField
dayOfWeek()
org.joda.time.DateTimeField
dayOfYear()
org.joda.time.DurationField
days()
Each day has exactly the same length: there is no daylight savingstatic ThreeSixtyDayChronology
getInstanceUTC()
Gets an instance of this Chronology in the UTC time zoneorg.joda.time.DateTimeZone
getZone()
Always returns UTCorg.joda.time.DateTimeField
halfdayOfDay()
org.joda.time.DurationField
halfdays()
org.joda.time.DateTimeField
hourOfDay()
org.joda.time.DateTimeField
hourOfHalfday()
org.joda.time.DurationField
hours()
org.joda.time.DurationField
millis()
org.joda.time.DateTimeField
millisOfDay()
org.joda.time.DateTimeField
millisOfSecond()
org.joda.time.DateTimeField
minuteOfDay()
org.joda.time.DateTimeField
minuteOfHour()
org.joda.time.DurationField
minutes()
org.joda.time.DateTimeField
monthOfYear()
org.joda.time.DurationField
months()
Each month has exactly 30 daysorg.joda.time.DateTimeField
secondOfDay()
org.joda.time.DateTimeField
secondOfMinute()
org.joda.time.DurationField
seconds()
String
toString()
org.joda.time.DurationField
weeks()
Each week has 7 daysorg.joda.time.Chronology
withUTC()
Returns this objectorg.joda.time.Chronology
withZone(org.joda.time.DateTimeZone zone)
Throws UnsupportedOperationException unless the time zone is UTCorg.joda.time.DateTimeField
year()
org.joda.time.DateTimeField
yearOfCentury()
org.joda.time.DurationField
years()
-
-
-
Method Detail
-
getInstanceUTC
public static ThreeSixtyDayChronology getInstanceUTC()
Gets an instance of this Chronology in the UTC time zone
-
months
public org.joda.time.DurationField months()
Each month has exactly 30 days
-
dayOfMonth
public org.joda.time.DateTimeField dayOfMonth()
-
monthOfYear
public org.joda.time.DateTimeField monthOfYear()
-
toString
public String toString()
- Specified by:
toString
in classorg.joda.time.chrono.BaseChronology
-
millis
public final org.joda.time.DurationField millis()
- Overrides:
millis
in classorg.joda.time.chrono.BaseChronology
-
seconds
public final org.joda.time.DurationField seconds()
- Overrides:
seconds
in classorg.joda.time.chrono.BaseChronology
-
minutes
public final org.joda.time.DurationField minutes()
- Overrides:
minutes
in classorg.joda.time.chrono.BaseChronology
-
hours
public final org.joda.time.DurationField hours()
- Overrides:
hours
in classorg.joda.time.chrono.BaseChronology
-
halfdays
public final org.joda.time.DurationField halfdays()
- Overrides:
halfdays
in classorg.joda.time.chrono.BaseChronology
-
days
public final org.joda.time.DurationField days()
Each day has exactly the same length: there is no daylight saving- Overrides:
days
in classorg.joda.time.chrono.BaseChronology
-
weeks
public final org.joda.time.DurationField weeks()
Each week has 7 days- Overrides:
weeks
in classorg.joda.time.chrono.BaseChronology
-
years
public final org.joda.time.DurationField years()
- Overrides:
years
in classorg.joda.time.chrono.BaseChronology
-
centuries
public final org.joda.time.DurationField centuries()
- Overrides:
centuries
in classorg.joda.time.chrono.BaseChronology
-
millisOfSecond
public final org.joda.time.DateTimeField millisOfSecond()
- Overrides:
millisOfSecond
in classorg.joda.time.chrono.BaseChronology
-
millisOfDay
public final org.joda.time.DateTimeField millisOfDay()
- Overrides:
millisOfDay
in classorg.joda.time.chrono.BaseChronology
-
secondOfMinute
public final org.joda.time.DateTimeField secondOfMinute()
- Overrides:
secondOfMinute
in classorg.joda.time.chrono.BaseChronology
-
secondOfDay
public final org.joda.time.DateTimeField secondOfDay()
- Overrides:
secondOfDay
in classorg.joda.time.chrono.BaseChronology
-
minuteOfHour
public final org.joda.time.DateTimeField minuteOfHour()
- Overrides:
minuteOfHour
in classorg.joda.time.chrono.BaseChronology
-
minuteOfDay
public final org.joda.time.DateTimeField minuteOfDay()
- Overrides:
minuteOfDay
in classorg.joda.time.chrono.BaseChronology
-
hourOfDay
public final org.joda.time.DateTimeField hourOfDay()
- Overrides:
hourOfDay
in classorg.joda.time.chrono.BaseChronology
-
hourOfHalfday
public final org.joda.time.DateTimeField hourOfHalfday()
- Overrides:
hourOfHalfday
in classorg.joda.time.chrono.BaseChronology
-
halfdayOfDay
public final org.joda.time.DateTimeField halfdayOfDay()
- Overrides:
halfdayOfDay
in classorg.joda.time.chrono.BaseChronology
-
clockhourOfDay
public final org.joda.time.DateTimeField clockhourOfDay()
- Overrides:
clockhourOfDay
in classorg.joda.time.chrono.BaseChronology
-
clockhourOfHalfday
public final org.joda.time.DateTimeField clockhourOfHalfday()
- Overrides:
clockhourOfHalfday
in classorg.joda.time.chrono.BaseChronology
-
dayOfWeek
public final org.joda.time.DateTimeField dayOfWeek()
- Overrides:
dayOfWeek
in classorg.joda.time.chrono.BaseChronology
-
dayOfYear
public final org.joda.time.DateTimeField dayOfYear()
- Overrides:
dayOfYear
in classorg.joda.time.chrono.BaseChronology
-
year
public final org.joda.time.DateTimeField year()
- Overrides:
year
in classorg.joda.time.chrono.BaseChronology
-
yearOfCentury
public final org.joda.time.DateTimeField yearOfCentury()
- Overrides:
yearOfCentury
in classorg.joda.time.chrono.BaseChronology
-
getZone
public final org.joda.time.DateTimeZone getZone()
Always returns UTC- Specified by:
getZone
in classorg.joda.time.chrono.BaseChronology
-
withZone
public final org.joda.time.Chronology withZone(org.joda.time.DateTimeZone zone)
Throws UnsupportedOperationException unless the time zone is UTC- Specified by:
withZone
in classorg.joda.time.chrono.BaseChronology
-
withUTC
public final org.joda.time.Chronology withUTC()
Returns this object- Specified by:
withUTC
in classorg.joda.time.chrono.BaseChronology
-
-