libnova  v 0.15.0
julian_day.h
00001 /*
00002  *  This library is free software; you can redistribute it and/or
00003  *  modify it under the terms of the GNU Lesser General Public
00004  *  License as published by the Free Software Foundation; either
00005  *  version 2 of the License, or (at your option) any later version.
00006  *
00007  *  This library is distributed in the hope that it will be useful,
00008  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00009  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00010  *  Lesser General Public License for more details.
00011  *
00012  *  You should have received a copy of the GNU General Public License
00013  *  along with this program; if not, write to the Free Software
00014  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00015  *  
00016  *  Copyright (C) 2000 - 2005 Liam Girdwood  
00017  */
00018 
00019 #ifndef _LN_JULIAN_DAY_H
00020 #define _LN_JULIAN_DAY_H
00021 
00022 #ifdef __WIN32
00023 #define __WIN32__
00024 #endif
00025 
00026 #include <time.h>
00027 #include <libnova/ln_types.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00040 double LIBNOVA_EXPORT ln_get_julian_day (struct ln_date * date);
00041 
00046 void LIBNOVA_EXPORT ln_get_date (double JD, struct ln_date * date);
00047 
00052 void LIBNOVA_EXPORT ln_get_date_from_timet (time_t * t, struct ln_date * date);
00053 
00058 void LIBNOVA_EXPORT ln_get_date_from_tm (struct tm * t, struct ln_date * date);
00059 
00064 void LIBNOVA_EXPORT ln_get_local_date (double JD, struct ln_zonedate * zonedate);
00065 
00070 unsigned int LIBNOVA_EXPORT ln_get_day_of_week (struct ln_date *date);
00071         
00076 double LIBNOVA_EXPORT ln_get_julian_from_sys ();
00077 
00078 
00083 void LIBNOVA_EXPORT ln_get_date_from_sys (struct ln_date * date);
00084         
00089 double LIBNOVA_EXPORT ln_get_julian_from_timet (time_t * in_time);
00090 
00095 void LIBNOVA_EXPORT ln_get_timet_from_julian (double JD, time_t * in_time);
00096 
00101 double LIBNOVA_EXPORT ln_get_julian_local_date(struct ln_zonedate* zonedate);
00102         
00107 int LIBNOVA_EXPORT ln_get_date_from_mpc (struct ln_date* date, char* mpc_date);
00108         
00113 double LIBNOVA_EXPORT ln_get_julian_from_mpc (char* mpc_date);
00114 
00119 void LIBNOVA_EXPORT ln_date_to_zonedate (struct ln_date * date, struct ln_zonedate * zonedate, long gmtoff);
00120 
00125 void LIBNOVA_EXPORT ln_zonedate_to_date (struct ln_zonedate * zonedate, struct ln_date * date);
00126 
00127 #ifdef __cplusplus
00128 };
00129 #endif
00130 
00131 #endif