|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.aerith.misao.util.JulianDay
The JulianDay
represents a Julian Day.
It keeps the date and time value in two styles. One is the Julian Day in double. Another one is the set of year, month and day in int, int and double repsectively.
Field Summary | |
protected double |
day
The day value of this date and time. |
static int |
FORMAT_DECIMALDAY_100000TH
The number of output accuracy type, which represents to output such a string as "2000 Jan 23.45678". |
static int |
FORMAT_DECIMALDAY_10000TH
The number of output accuracy type, which represents to output such a string as "2000 Jan 23.4567". |
static int |
FORMAT_DECIMALDAY_1000TH
The number of output accuracy type, which represents to output such a string as "2000 Jan 23.456". |
static int |
FORMAT_DECIMALDAY_100TH
The number of output accuracy type, which represents to output such a string as "2000 Jan 23.45". |
static int |
FORMAT_DECIMALDAY_10TH
The number of output accuracy type, which represents to output such a string as "2000 Jan 23.4". |
static int |
FORMAT_DECIMALDAY_1TH
The number of output accuracy type, which represents to output such a string as "2000 Jan 23". |
static int |
FORMAT_DEFAULT
The number of output accuracy type, which represents to output such a string as "2000 Jan 23.45678". |
static int |
FORMAT_JD
The number of type to output month, which represents to output the Julian Day such as "2451234.12345". |
static int |
FORMAT_MONTH_IN_CODE
The number of type to output month, which represents to output the code of month such as "2000 Jan 23". |
static int |
FORMAT_MONTH_IN_FULL_SPELL
The number of type to output month, which represents to output the full spell name such as "2000 January 23". |
static int |
FORMAT_MONTH_IN_NUMBER
The number of type to output month, which represents to output the month in number such as "2000 01 23". |
static int |
FORMAT_MONTH_IN_NUMBER_WITHOUT_SPACE
The number of type to output month, which represents to output the month in number without space such as "20000123". |
static int |
FORMAT_MONTH_IN_REDUCED
The number of type to output month, which represents to output the reduced name such as "2000 Jan. |
static int |
FORMAT_TO_DAY
The number of output accuracy type, which represents to output such a string as "2000 Jan 23". |
static int |
FORMAT_TO_HOUR
The number of output accuracy type, which represents to output such a string as "2000 Jan 23 01h". |
static int |
FORMAT_TO_MINUTE
The number of output accuracy type, which represents to output such a string as "2000 Jan 23 01:23". |
static int |
FORMAT_TO_SECOND
The number of output accuracy type, which represents to output such a string as "2000 Jan 23 01:23:45". |
protected double |
julian_day
The value of this date and time in Julian Day. |
protected int |
month
The month value of this date and time. |
protected static java.lang.String[] |
month_code
The output codes of months. |
protected static java.lang.String[] |
month_full_name
The full spell output strings of months. |
protected static java.lang.String[] |
month_reduced_name
The reduced output strings of months. |
protected int |
year
The year value of this date and time. |
Constructor Summary | |
JulianDay()
Constructs a JulianDay at J2000.0. |
|
JulianDay(double initial_jd)
Constructs a JulianDay of the specified Julian
Day. |
|
JulianDay(int initial_year,
int initial_month,
double initial_day)
Constructs a JulianDay of the specified year,
month and day. |
|
JulianDay(int initial_year,
int initial_month,
int initial_day,
int initial_hour,
int initial_minute,
double initial_second)
Constructs a JulianDay of the specified year,
month, day, hour, minute, and second. |
Method Summary | |
static JulianDay |
create(java.util.Date date)
Creates a JulianDay object from the specified
local time considering the time zone. |
static JulianDay |
create(java.lang.String string)
Creates a JulianDay object from the specified
string. |
static int |
getAccuracy(java.lang.String string)
Gets a accuracy of the specified date string. |
int |
getDay()
Gets the day. |
double |
getDecimalDay()
Gets the day and time in day. |
static int |
getEquivalentAccuracy(int date_accuracy)
Gets the equivalent accuracy of the specified accuracy. |
static java.lang.String |
getFullSpellMonthString(int m)
Gets the full spell name of the specified month. |
int |
getHour()
Gets the hour. |
double |
getJD()
Gets date and time value of this object as Julian Day. |
int |
getMinute()
Gets the minute. |
int |
getMonth()
Gets the month. |
static int |
getMonth(java.lang.String month)
Gets the month of the specified month string. |
static java.lang.String |
getMonthCode(int m)
Gets the code of the specified month. |
java.lang.String |
getOutputString(int month_format,
int date_accuracy)
Returns a string representation of the state of this object in the specified format. |
static java.lang.String |
getReducedMonthString(int m)
Gets the reduced name of the specified month. |
int |
getSecond()
Gets the second. |
int |
getYear()
Gets the year. |
static boolean |
isDecimalDay(int date_accuracy)
Returns true when the specified accuracy represents decimal day. |
JulianDay |
round(int date_accuracy)
Rounds this day to the accuracy of the specified format and creates a new JulianDay object. |
protected void |
updateYearMonthDay()
Converts the Julian Day of this object into year, month and day, and sets them into the member fields of this object. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected double julian_day
protected int year
protected int month
protected double day
protected static final java.lang.String[] month_full_name
protected static final java.lang.String[] month_reduced_name
protected static final java.lang.String[] month_code
public static final int FORMAT_DEFAULT
public static final int FORMAT_DECIMALDAY_100000TH
public static final int FORMAT_DECIMALDAY_10000TH
public static final int FORMAT_DECIMALDAY_1000TH
public static final int FORMAT_DECIMALDAY_100TH
public static final int FORMAT_DECIMALDAY_10TH
public static final int FORMAT_DECIMALDAY_1TH
public static final int FORMAT_TO_SECOND
public static final int FORMAT_TO_MINUTE
public static final int FORMAT_TO_HOUR
public static final int FORMAT_TO_DAY
public static final int FORMAT_MONTH_IN_FULL_SPELL
public static final int FORMAT_MONTH_IN_REDUCED
public static final int FORMAT_MONTH_IN_CODE
public static final int FORMAT_MONTH_IN_NUMBER
public static final int FORMAT_MONTH_IN_NUMBER_WITHOUT_SPACE
public static final int FORMAT_JD
Constructor Detail |
public JulianDay()
JulianDay
at J2000.0.public JulianDay(double initial_jd)
JulianDay
of the specified Julian
Day.initial_jd
- the Julian Day.public JulianDay(int initial_year, int initial_month, double initial_day)
JulianDay
of the specified year,
month and day.initial_year
- the year of the date and time to construct.initial_month
- the month of the date and time to construct.initial_day
- the day of the date and time to construct.public JulianDay(int initial_year, int initial_month, int initial_day, int initial_hour, int initial_minute, double initial_second)
JulianDay
of the specified year,
month, day, hour, minute, and second.initial_year
- the year of the date and time to construct.initial_month
- the month of the date and time to construct.initial_day
- the day of the date and time to construct.initial_hour
- the hour of the date and time to construct.initial_minute
- the minute of the date and time to construct.initial_second
- the second of the date and time to construct.Method Detail |
public static JulianDay create(java.util.Date date)
JulianDay
object from the specified
local time considering the time zone.date
- the Date
object of the local time.JulianDay
object.public static JulianDay create(java.lang.String string)
JulianDay
object from the specified
string.string
- the string which represents the date and time.JulianDay
object.public static int getAccuracy(java.lang.String string)
string
- the string which represents the date and time.protected void updateYearMonthDay()
public double getJD()
public int getYear()
public int getMonth()
public int getDay()
public double getDecimalDay()
public int getHour()
public int getMinute()
public int getSecond()
public JulianDay round(int date_accuracy)
JulianDay
object.date_accuracy
- the number of accuracy.public static java.lang.String getFullSpellMonthString(int m)
m
- the month between 1 and 12.public static java.lang.String getReducedMonthString(int m)
m
- the month between 1 and 12.public static java.lang.String getMonthCode(int m)
m
- the month between 1 and 12.public static int getMonth(java.lang.String month) throws java.util.NoSuchElementException
month
- the month string.public static boolean isDecimalDay(int date_accuracy)
date_accuracy
- the format number of the accuracy.public static int getEquivalentAccuracy(int date_accuracy)
date_accuracy
- the format number of the accuracy.public java.lang.String getOutputString(int month_format, int date_accuracy)
month_format
- the number of format to output month.date_accuracy
- the number of accuracy.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |