X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/46f4442e9a5a4f3b98b7c1083586332f6a8a99a4..586446045a9ad027ace9532db9e32639f87706dd:/icuSources/i18n/astro.h?ds=inline diff --git a/icuSources/i18n/astro.h b/icuSources/i18n/astro.h index cd20b6cf..8feb391c 100644 --- a/icuSources/i18n/astro.h +++ b/icuSources/i18n/astro.h @@ -1,5 +1,5 @@ /************************************************************************ - * Copyright (C) 1996-2008, International Business Machines Corporation * + * Copyright (C) 1996-2008,2014 International Business Machines Corporation * * and others. All Rights Reserved. * ************************************************************************ * 2003-nov-07 srl Port from Java @@ -464,6 +464,24 @@ public: // The Sun //------------------------------------------------------------------------- + /** + * Returns sunLongitude which may be adjusted for correctness + * based on the time, using a table which only has data covering + * gregorian years 1900-2100. + *
+ * @param theSunLongitude the sunLongitude to be adjusted if necessary + * @param theTime the time for which the sunLongitude is to be adjusted + * @internal + */ + static double adjustSunLongitude(double &theSunLongitude, UDate theTime); + + /** + * The longitude of the sun at the time specified by theTime. + * This does not result in caching of any of the intermediate computations. + * @internal + */ + static double getSunLongitudeForTime(UDate theTime); + /** * The longitude of the sun at the time specified by this object. * The longitude is measured in radians along the ecliptic @@ -480,7 +498,7 @@ public: /** * TODO Make this public when the entire class is package-private. */ - /*public*/ void getSunLongitude(double julianDay, double &longitude, double &meanAnomaly); + /*public*/ static void getSunLongitude(double julianDay, double &longitude, double &meanAnomaly); /** * The position of the sun at this object's current date and time, @@ -619,6 +637,19 @@ public: */ // static const MoonAge LAST_QUARTER(); + /** + * Find the next or previous time of a new moon if date is in the + * range handled by this function (approx gregorian 1900-2100), + * else return 0. + *
+ * @param theTime the time relative to which the function should find + * the next or previous new moon + * @param next true if the next occurrance of the new moon + * is desired, false for the previous occurrance. + * @internal + */ + static UDate getNewMoonTimeInRange(UDate theTime, UBool next); + /** * Find the next or previous time at which the Moon's ecliptic * longitude will have the desired value.