|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdriver.ted.utilities.T_JulianDate
public class T_JulianDate
Title: T_JulianDate Class
Description: Provides a Julian Date implementation based upon
Jean Meeus' Astronomical Algorithms.
Copyright:(c) 2002
Change History:
| Constructor Summary | |
|---|---|
T_JulianDate()
T_JulianDate Default Constructor that sets the date and time to the current computer time. |
|
T_JulianDate(double j)
T_JulianDate Constructor that sets the date and time based on a double provided as the julian date. |
|
T_JulianDate(int mo,
int da,
int y,
int h,
int mi,
int s)
T_JulianDate Constructor that sets the date and time based on the given parameters. |
|
T_JulianDate(T_Time ti,
T_Date da)
T_JulianDate Constructor that sets the date and time based on the given T_Time and T_Date objects. |
|
| Method Summary | |
|---|---|
void |
advance(int mo,
int d,
int y,
int h,
int mi,
int s)
This function will increment (or decrement) the date and time by the specified amounts. |
T_Date |
getDate()
This function returns the T_Date class for the current date. |
java.lang.String |
getDayOfWeek()
This function returns a string representation of the day of week. |
int |
getDayOfYear()
This function returns the julian day or the day of the year. |
double |
getDayOfYearAndTime()
This function returns the julian day or the day of the year with a fraction appended representing the time of day. |
boolean |
getGregorian()
This function returns the current gregorian boolean value. |
int |
getIntDayOfWeek()
This function returns an integer representing the day of the week. |
double |
getJulianDate()
This function returns the current julian date double value. |
boolean |
getLeapYear()
This function returns the current leap year boolean value. |
double |
getModifiedJulianDate()
This function returns the modified Julian date. |
T_Time |
getTime()
This function returns the T_Time class for the current time. |
void |
setDate(int mo,
int day,
int year)
Set the date and update the Julian Date |
void |
setDayOfYear(int doy)
This function will set the Julian date based on the day of year. |
void |
setJulianDate()
This function will set the julian date to the current system time and date using the default machine timezone. |
void |
setJulianDate(double j)
This function will set the julian date to the date represented by the double value passed in. |
void |
setJulianDate(int mo,
int d,
int y,
int h,
int mi,
int s)
This function will change the Julian date to the new date and time as specified by the input parameters. |
void |
setJulianDate(T_Date d,
T_Time t)
This function will change the Julian date to the new date and time as specified by the input parameters |
void |
setTime(int hr,
int min,
int sec)
Set the time and update the Julian Date |
java.lang.String |
toMediumString()
This method returns a longer String representation of the Julian Date including the double, date and time values. |
java.lang.String |
toSTKUTCGString()
This method returns a String representation of the Julian Date in STK's UTCG format. |
java.lang.String |
toString()
This method returns a String representation of the Julian Date including the double, date and time values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public T_JulianDate()
public T_JulianDate(int mo,
int da,
int y,
int h,
int mi,
int s)
mo - The month 1-12da - The day 1-31y - The year -4712 to 10000h - The hour 0-23mi - The minutes 0-59s - The seconds 0-59
public T_JulianDate(T_Time ti,
T_Date da)
ti - The T_Time class initialized to a specific time.da - The T_Date class initialized to a specific date.public T_JulianDate(double j)
j - The double representing the julian date| Method Detail |
|---|
public java.lang.String toString()
2451545.0 -- 01/01/00 12:00:00
toString in class java.lang.Objectpublic java.lang.String toMediumString()
January 01, 2000 12:00:00, 2451545.0
public java.lang.String toSTKUTCGString()
(dd mmm yyyy hh:mm:ss.s)
public void setDayOfYear(int doy)
doy - The interger day of the year.
public void advance(int mo,
int d,
int y,
int h,
int mi,
int s)
mo - The number of months to advance (positive or negative).d - The number of days to advance (positive or negative).y - The number of years to advance (positive or negative).h - The number of hours to advance (positive or negative).mi - The number of minutes to advance (positive or negative).s - The number of seconds to advance (positive or negative).
public void setJulianDate(int mo,
int d,
int y,
int h,
int mi,
int s)
mo - The number of months to advanced - The number of days to advancey - The number of years to advanceh - The number of hours to advancemi - The number of minutes to advances - The number of seconds to advance
public void setJulianDate(T_Date d,
T_Time t)
d - A T_Date class with a specified date sett - A T_Time class with the specified time setpublic void setJulianDate()
public void setDate(int mo,
int day,
int year)
mo - The month (1-12)day - The day (1-31) Must correct for the defined month at the time of setting.year - The year (-4712 to 10000)
public void setTime(int hr,
int min,
int sec)
hr - The hourmin - The minutesec - The secondpublic void setJulianDate(double j)
j - The double value representing the julian datepublic double getJulianDate()
public boolean getLeapYear()
true)
or not (false).public boolean getGregorian()
true)
or not (false).public java.lang.String getDayOfWeek()
public int getIntDayOfWeek()
public int getDayOfYear()
public double getDayOfYearAndTime()
public double getModifiedJulianDate()
public T_Date getDate()
public T_Time getTime()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||