Codebase list libhdate / 9309d92
[svn-upgrade] Integrating new upstream version, libhdate (1.4.11) Yaacov Zamir 16 years ago
64 changed file(s) with 4441 addition(s) and 624 deletion(s). Raw diff Collapse all Expand all
0 libhdate (1.4.11)
1
2 * Add Ruby bindings
3 * Add PHP bindings
4 * Add GPL notice to the example files (Bug report: Baruch Even)
5 * Add a patch to print todays date in hcal in bold (Patch: Patrik Nilsson)
6 * Fix documentation of files and structs (Bug report: Baruch Even)
7 * Update Swedish translation (Thanks: Patrik Nilsson)
8 * Fix hdate_get_utc_sun_time_deg
9 function only work in low altitudes (Bug report: Ido Kanner)
10 * Update pascal bindings and examples (Patch: Ido Kanner)
11
12 -- Yaacov Zamir <kzamir@wall.co.il> Saturday, 5 Jan 2008 22:00
13
014 libhdate (1.4.10)
115
216 * Move to GPL3 (COPYING, AUTHORS)
1529 - 30 shvat : Family day
1630 - 12 heshvan : rabin memorial day
1731 - 29 tamuz : zhabotinsky day
18
1932 * Changes to hdate command line utility
2033 - flag -j print the Julian day number
2134 - if argument is greater than 100000 it is asumed as Julian day number
156156 PA_VERSION = @PA_VERSION@
157157 PE_CFLAGS = @PE_CFLAGS@
158158 PE_MODULES_PATH = @PE_MODULES_PATH@
159 PH_CONFIG_PATH = @PH_CONFIG_PATH@
160 PH_MODULES_PATH = @PH_MODULES_PATH@
159161 PKG_CONFIG = @PKG_CONFIG@
160162 POSUB = @POSUB@
161163 PY_CFLAGS = @PY_CFLAGS@
162164 PY_MODULES_PATH = @PY_MODULES_PATH@
163165 PY_VERSION = @PY_VERSION@
164166 RANLIB = @RANLIB@
167 RU_CFLAGS = @RU_CFLAGS@
168 RU_MODULES_PATH = @RU_MODULES_PATH@
169 RU_VERSION = @RU_VERSION@
165170 SED = @SED@
166171 SET_MAKE = @SET_MAKE@
167172 SHELL = @SHELL@
175180 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
176181 WITH_PERL_FALSE = @WITH_PERL_FALSE@
177182 WITH_PERL_TRUE = @WITH_PERL_TRUE@
183 WITH_PHP_FALSE = @WITH_PHP_FALSE@
184 WITH_PHP_TRUE = @WITH_PHP_TRUE@
178185 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
179186 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
187 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
188 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
180189 XGETTEXT = @XGETTEXT@
181190 XGETTEXT_015 = @XGETTEXT_015@
182191 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
205214 exec_prefix = @exec_prefix@
206215 have_pascal = @have_pascal@
207216 have_perl = @have_perl@
217 have_php = @have_php@
218 have_php_config = @have_php_config@
208219 have_python = @have_python@
220 have_ruby = @have_ruby@
209221 have_swig = @have_swig@
210222 host = @host@
211223 host_alias = @host_alias@
0 SUBDIRS = python perl pascal
0 SUBDIRS = python perl pascal ruby php
128128 PA_VERSION = @PA_VERSION@
129129 PE_CFLAGS = @PE_CFLAGS@
130130 PE_MODULES_PATH = @PE_MODULES_PATH@
131 PH_CONFIG_PATH = @PH_CONFIG_PATH@
132 PH_MODULES_PATH = @PH_MODULES_PATH@
131133 PKG_CONFIG = @PKG_CONFIG@
132134 POSUB = @POSUB@
133135 PY_CFLAGS = @PY_CFLAGS@
134136 PY_MODULES_PATH = @PY_MODULES_PATH@
135137 PY_VERSION = @PY_VERSION@
136138 RANLIB = @RANLIB@
139 RU_CFLAGS = @RU_CFLAGS@
140 RU_MODULES_PATH = @RU_MODULES_PATH@
141 RU_VERSION = @RU_VERSION@
137142 SED = @SED@
138143 SET_MAKE = @SET_MAKE@
139144 SHELL = @SHELL@
147152 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
148153 WITH_PERL_FALSE = @WITH_PERL_FALSE@
149154 WITH_PERL_TRUE = @WITH_PERL_TRUE@
155 WITH_PHP_FALSE = @WITH_PHP_FALSE@
156 WITH_PHP_TRUE = @WITH_PHP_TRUE@
150157 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
151158 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
159 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
160 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
152161 XGETTEXT = @XGETTEXT@
153162 XGETTEXT_015 = @XGETTEXT_015@
154163 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
177186 exec_prefix = @exec_prefix@
178187 have_pascal = @have_pascal@
179188 have_perl = @have_perl@
189 have_php = @have_php@
190 have_php_config = @have_php_config@
180191 have_python = @have_python@
192 have_ruby = @have_ruby@
181193 have_swig = @have_swig@
182194 host = @host@
183195 host_alias = @host_alias@
203215 sharedstatedir = @sharedstatedir@
204216 sysconfdir = @sysconfdir@
205217 target_alias = @target_alias@
206 SUBDIRS = python perl pascal
218 SUBDIRS = python perl pascal ruby php
207219 all: all-recursive
208220
209221 .SUFFIXES:
00
1 EXTRA_DIST = Package.fpc hdate.pp hdate_class.pp fpc_README changelog
1 EXTRA_DIST = Package.fpc hdate.pp hdate_dyn_pascal.pp fpc_README changelog
22
33 if WITH_PASCAL
44
66
77 CLEANFILES = *.o *.ppu
88
9 all-am: hdate.o hdate_class.o
9 all-am: hdate.o hdate_dyn_pascal.o
1010
1111 hdate.o: hdate.pp
1212 fpc hdate.pp
1313
14 hdate_class.o: hdate_class.pp hdate.o
15 fpc hdate_class.pp
16
17 install-data-local:hdate_class.o hdate.o Package.fpc
14 hdate_dyn_pascal.o: hdate_dyn_pascal.pp hdate.o
15 fpc hdate_dyn_pascal.pp
16
17 install-data-local:hdate_dyn_pascal.o hdate.o
1818 $(mkinstalldirs) $(DESTDIR)$(PA_MODULES_PATH)/hdate
1919 $(INSTALL_DATA) hdate.o $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate.o
20 $(INSTALL_DATA) hdate_class.o $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate_class.o
20 $(INSTALL_DATA) hdate_dyn_pascal.o $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate_dyn_pascal.o
2121 $(INSTALL_DATA) hdate.ppu $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate.ppu
22 $(INSTALL_DATA) hdate_class.ppu $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate_class.ppu
22 $(INSTALL_DATA) hdate_dyn_pascal.ppu $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate_dyn_pascal.ppu
2323 $(INSTALL_DATA) fpc_README $(DESTDIR)$(PA_MODULES_PATH)/hdate/fpc_README
2424 $(INSTALL_DATA) Package.fpc $(DESTDIR)$(PA_MODULES_PATH)/hdate/Package.fpc
2525 endif
119119 PA_VERSION = @PA_VERSION@
120120 PE_CFLAGS = @PE_CFLAGS@
121121 PE_MODULES_PATH = @PE_MODULES_PATH@
122 PH_CONFIG_PATH = @PH_CONFIG_PATH@
123 PH_MODULES_PATH = @PH_MODULES_PATH@
122124 PKG_CONFIG = @PKG_CONFIG@
123125 POSUB = @POSUB@
124126 PY_CFLAGS = @PY_CFLAGS@
125127 PY_MODULES_PATH = @PY_MODULES_PATH@
126128 PY_VERSION = @PY_VERSION@
127129 RANLIB = @RANLIB@
130 RU_CFLAGS = @RU_CFLAGS@
131 RU_MODULES_PATH = @RU_MODULES_PATH@
132 RU_VERSION = @RU_VERSION@
128133 SED = @SED@
129134 SET_MAKE = @SET_MAKE@
130135 SHELL = @SHELL@
138143 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
139144 WITH_PERL_FALSE = @WITH_PERL_FALSE@
140145 WITH_PERL_TRUE = @WITH_PERL_TRUE@
146 WITH_PHP_FALSE = @WITH_PHP_FALSE@
147 WITH_PHP_TRUE = @WITH_PHP_TRUE@
141148 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
142149 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
150 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
151 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
143152 XGETTEXT = @XGETTEXT@
144153 XGETTEXT_015 = @XGETTEXT_015@
145154 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
168177 exec_prefix = @exec_prefix@
169178 have_pascal = @have_pascal@
170179 have_perl = @have_perl@
180 have_php = @have_php@
181 have_php_config = @have_php_config@
171182 have_python = @have_python@
183 have_ruby = @have_ruby@
172184 have_swig = @have_swig@
173185 host = @host@
174186 host_alias = @host_alias@
194206 sharedstatedir = @sharedstatedir@
195207 sysconfdir = @sysconfdir@
196208 target_alias = @target_alias@
197 EXTRA_DIST = Package.fpc hdate.pp hdate_class.pp fpc_README changelog
209 EXTRA_DIST = Package.fpc hdate.pp hdate_dyn_pascal.pp fpc_README changelog
198210 @WITH_PASCAL_TRUE@DEPS = $(top_builddir)/src/libhdate.la
199211 @WITH_PASCAL_TRUE@CLEANFILES = *.o *.ppu
200212 all: all-am
360372 uninstall uninstall-am uninstall-info-am
361373
362374
363 @WITH_PASCAL_TRUE@all-am: hdate.o hdate_class.o
375 @WITH_PASCAL_TRUE@all-am: hdate.o hdate_dyn_pascal.o
364376
365377 @WITH_PASCAL_TRUE@hdate.o: hdate.pp
366378 @WITH_PASCAL_TRUE@ fpc hdate.pp
367379
368 @WITH_PASCAL_TRUE@hdate_class.o: hdate_class.pp hdate.o
369 @WITH_PASCAL_TRUE@ fpc hdate_class.pp
370
371 @WITH_PASCAL_TRUE@install-data-local:hdate_class.o hdate.o Package.fpc
380 @WITH_PASCAL_TRUE@hdate_dyn_pascal.o: hdate_dyn_pascal.pp hdate.o
381 @WITH_PASCAL_TRUE@ fpc hdate_dyn_pascal.pp
382
383 @WITH_PASCAL_TRUE@install-data-local:hdate_dyn_pascal.o hdate.o
372384 @WITH_PASCAL_TRUE@ $(mkinstalldirs) $(DESTDIR)$(PA_MODULES_PATH)/hdate
373385 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) hdate.o $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate.o
374 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) hdate_class.o $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate_class.o
386 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) hdate_dyn_pascal.o $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate_dyn_pascal.o
375387 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) hdate.ppu $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate.ppu
376 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) hdate_class.ppu $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate_class.ppu
388 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) hdate_dyn_pascal.ppu $(DESTDIR)$(PA_MODULES_PATH)/hdate/hdate_dyn_pascal.ppu
377389 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) fpc_README $(DESTDIR)$(PA_MODULES_PATH)/hdate/fpc_README
378390 @WITH_PASCAL_TRUE@ $(INSTALL_DATA) Package.fpc $(DESTDIR)$(PA_MODULES_PATH)/hdate/Package.fpc
379391 # Tell versions [3.59,3.63) of GNU make to not export all variables.
00 [package]
11 name=hdate
2 version=1.0.0
2 version=1.4.11
33 [require]
44 libc=y
55 packages_linux_m68k=
0 25/11/2005
1 - Added some constants and fixed comments according the orginal API file
0 25/01/2008
1 - Moved the class implementation to examples/binding
2 - Added better support for FPDoc
3 - Changed the demo for the class usage
4
5 11-12/01/2008
6 - Added support for newer API functions added at 1.3
7 - Added support for dynamic loading for the API.
8 - Added dynamic loading capabilities to the examples.
9 - Moved to GPL 3
10
11 25/11/2005
12 - Added some constants and fixed comments according the orginal API file
13
14 25/11/2005
15 - Added some constants and fixed comments according the orginal API file
216
317 27/05/2005
4 - Created a Changelog.
18 - Created a Changelog.
519
620 19-21/05/2005
7 - hdate_class.pp was created.
8 - Made changes for Free Pascal 2 support on with the units.
21 - hdate_class.pp was created.
22 - Made changes for Free Pascal 2 support on with the units.
923
1024 13/03/2005
11 - Bug fix in hdate.pp - Added {$PACKRECORDS C}
25 - Bug fix in hdate.pp - Added {$PACKRECORDS C}
1226
1327 10-11/03/2005
14 - hdate.pp was created.
15 - hdate_obj.pp was created.
28 - hdate.pp was created.
29 - hdate_obj.pp was created.
44 It is using the source code from Amos Shapir's hdate package fixed and patched by Nadav Har'El.
55 The Torah reading sequence is from tables by Zvi Har'El.
66
7 The LibHdate is GPL library written by Kobi Zamir <kobi_zamir@yahoo.com> and can be found at http://libhdate.sourceforge.net/ .
7 The LibHdate is GPL library written by Kobi Zamir <kzamir@walla.co.il> and can be found at http://libhdate.sourceforge.net/ .
88
9 The current version of LibHDate is 1.2.1 and contains a Free Pascal binding only that was written by Ido Kanner <idokan@gmail.com>.
9 The current version of LibHDate is 1.4.10 and contains a Free Pascal binding only that was written by Ido Kanner <idokan@gmail.com>.
1010
1111 Existed Files:
12 README - This file.
13 licence - A copy of the GPL license.
14 src/ctypes.pp - A unit for making C like integer and floating points variable type.
15 src/hdate.pp - The main low level API of LibHdate binding.
16 src/hdate_obj.pp - An Object Oriented implementation for the hdate.pp API.
17 src/hdate_obj_demo.pp - An example for the use of the Object Oriented unit.
18 src/hdate_class.pp - A self made Object Oriented implementation for the LibHdate API.
12 /bindings/pascal/fpc_README - This file.
13
14 COPYING - A copy of the GPL license.
15
16 examples/bindings/pascal/hdate_obj.pp - An Object Oriented implementation for the hdate.pp API.
17 examples/bindings/pascal/hdate_obj_demo.pp - An example for the use of the Object Oriented unit.
18 examples/bindings/pascal/hdate_class.pp - A self made Object Oriented implementation for the LibHdate API.
19
20 bindings/pascal/
21 bindings/pascal/hdate.pp - The main low level API of LibHdate binding.
22 bindings/pascal/hdate_dyn_pascal.pp - A dynamic linking library.
23
1924
2025 Compiling
2126 =========
2328 The ctypes.pp unit was taken from FPC 1.9.8 version and was modified to contain also some floating point C equivalent.
2429 The FPC version 2.0 have the floating points definition. If you are using FPC version 2.0 or above please remove the unit.
2530
26 Add the hdate.pp and the hdate_obj.pp (or thier .ppu files after compilation) to the path of fpc.cfg in order to use
27 the units globally with all of your applications.
31 Add the hdate.pp and the hdate_obj.pp (or thier .ppu files after compilation) to the path of fpc.cfg in order to use the units globally with all of your applications.
32
33 It is recommanded to use FPC 2.2.0 or above for the newer version of this library.
2834
2935 =========================================================================
3036 the old README from version 1.1.1
00 (* libhdate
1 Copyright 2004-2005 Yaacov Zamir <kzamir@walla.co.il>
2 Copyright 2005 Ido Kanner <idokan@gmail.com>
1
2 Copyright (C) 1984-2003 Amos Shapir, 2004-2007 Yaacov Zamir <kzamir@walla.co.il>
3 Copyright (C) 2005-2008 Ido Kanner <idokan@gmail.com>
34
45 This program is free software; you can redistribute it and/or modify
56 it under the terms of the GNU General Public License as published by
1617 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1718
1819 History:
20 11/01/2008 - Added support for 1.3 API and cleaned the calling.
1921 25/11/2005 - Added some constants and fixed comments according the orginal API file
2022 13/03/2005 - Bug Fixed Added {$PACKRECORDS C}
21 10-11/03/2005 - Initial Translation of version 0.31.0
22 *)
23 {$MODE OBJFPC}{$PACKRECORDS C}
23 10-11/03/2005 - Initial Translation of version 0.31.0
24 *)
25 {$MODE FPC}{$PACKRECORDS C}
26 {$LINKLIB hdate}
2427
2528 unit hdate;
2629
2831 uses cTypes;
2932
3033 const
34 // the global name of the hdate library: <b>DEPERCATED</b>
3135 LIBHDATE_LIBRARY_NAME = 'hdate';
3236
3337 (** @def HDATE_DIASPORA_FLAG
5458 { Base structore for hebrew dates }
5559
5660 type
61 // A pointer to the Thdate_struct record
5762 Phdate_struct = ^Thdate_struct;
5863 Thdate_struct = record
59 hd_day : cInt; //The number of day in the hebrew month (1..31).
60 hd_mon : cInt; //The number of the hebrew month 1..14 (1 - tishre, 13 - adar 1, 14 - adar 2).
61 hd_year : cInt; //The number of the hebrew year.
62 gd_day : cInt; //The number of the day in the month. (1..31)
63 gd_mon : cInt; //The number of the month 1..12 (1 - jan).
64 gd_year : cInt; //The number of the year.
65 hd_dw : cInt; //The day of the week 1..7 (1 - sunday).
66 hd_size_of_year : cInt; //The length of the year in days.
67 hd_new_year_dw : cInt; //The week day of Hebrew new year.
68 hd_year_type : cInt; //The number type of year.
69 hd_jd : cInt; //The Julian day number
70 hd_days : cInt; //The number of days passed since 1 tishrey
71 hd_weeks : cInt; //The number of weeks passed since 1 tishrey
64 //The number of day in the hebrew month (1..31).
65 hd_day : cInt;
66 //The number of the hebrew month 1..14 (1 - tishre, 13 - adar 1, 14 - adar 2).
67 hd_mon : cInt;
68 //The number of the hebrew year.
69 hd_year : cInt;
70 //The number of the day in the month. (1..31)
71 gd_day : cInt;
72 //The number of the month 1..12 (1 - jan).
73 gd_mon : cInt;
74 //The number of the year.
75 gd_year : cInt;
76 //The day of the week 1..7 (1 - sunday).
77 hd_dw : cInt;
78 //The length of the year in days.
79 hd_size_of_year : cInt;
80 //The week day of Hebrew new year.
81 hd_new_year_dw : cInt;
82 //The number type of year.
83 hd_year_type : cInt;
84 //The Julian day number
85 hd_jd : cInt;
86 //The number of days passed since 1 tishrey
87 hd_days : cInt;
88 //The number of weeks passed since 1 tishrey
89 hd_weeks : cInt;
7290 end;
7391 (********************************************************************************)
7492 (********************************************************************************)
82100 @param y Year in 4 digits e.g. 2001
83101 @return pointer to this hdate struct
84102 *)
85
86103 function hdate_set_gdate (h : Phdate_struct; d, m, y : cInt) : Phdate_struct;
87 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_set_gdate';
104 cdecl; external;
88105
89106 (**
90107 @brief compute date structure from the Hebrew date
95112 @param y Year in 4 digits e.g. 5731
96113 @return pointer to this hdate struct
97114 *)
98
99115 function hdate_set_hdate (h : Phdate_struct; d, m, y : cInt) : Phdate_struct;
100 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_set_hdate';
116 cdecl; external;
101117
102118 (**
103119 @brief compute date structure from the Julian day
107123 @return pointer to this hdate struct
108124 *)
109125 function hdate_set_jd (h : Phdate_struct; jd : cInt) : Phdate_struct;
110 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_set_jd';
126 cdecl; external;
111127
112128 (*************************************************************)
113129 (*************************************************************)
124140 @return a static string of foramted date
125141 *)
126142 function hdate_get_format_date (h : Phdate_struct; diaspora, s : cInt) : PChar;
127 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_format_date';
143 cdecl; external;
128144
129145 (**
130146 @brief get the number of hebrew parasha.
135151 (55 trow 61 are joined strings e.g. Vayakhel Pekudei)
136152 *)
137153 function hdate_get_parasha (h : Phdate_struct; diaspora : cInt) : cInt;
138 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_parasha';
154 cdecl; external;
139155
140156 (**
141157 @brief get the number of hebrew holyday.
145161 @return the number of holyday.
146162 *)
147163 function hdate_get_holyday (h : Phdate_struct; diaspora : cInt) : cInt;
148 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_holyday';
164 cdecl; external;
149165
150166 (*************************************************************)
151167 (*************************************************************)
158174 @attention ( 0 < n < 10000)
159175 *)
160176 function hdate_get_int_string (n : cInt) : PChar;
161 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_int_string';
177 cdecl; external;
162178
163179 (**
164180 @brief get name of week day.
169185 @return a static string of the day of the week
170186 *)
171187 function hdate_get_day_string (day : cInt; s : cInt) : PChar;
172 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_day_string';
188 cdecl; external;
173189
174190 (**
175191 @brief name of month.
179195 @return a static string of month name
180196 *)
181197 function hdate_get_month_string (month : cInt; s : cInt) : PChar;
182 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_month_string';
198 cdecl; external;
183199
184200 (**
185201 @brief name of hebrew month.
190206 @return a static string of month name
191207 *)
192208 function hdate_get_hebrew_month_string (month : cInt; s : cInt) : PChar;
193 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_hebrew_month_string';
209 cdecl; external;
194210
195211 (**
196212 @brief name of hebrew holyday.
200216 @return a static string of holyday name
201217 *)
202218 function hdate_get_holyday_string (holyday, s : cInt) : PChar;
203 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_holyday_string';
219 cdecl; external;
204220
205221 (**
206222 @brief name of parasha
211227 @return a static string of parasha name
212228 *)
213229 function hdate_get_parasha_string (parasha, s : cInt) : PChar;
214 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_parasha_string';
230 cdecl; external;
215231
216232 (*************************************************************)
217233 (*************************************************************)
223239 @return the number of holyday type.
224240 *)
225241 function hdate_get_holyday_type (holyday : cInt) : cInt;
226 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_holyday_type';
242 cdecl; external;
227243
228244 (**
229245 @brief size of hebrew year in days.
232248 @return size of Hebrew year
233249 *)
234250 function hdate_get_size_of_hebrew_year (hebrew_year : cInt) : cInt;
235 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_size_of_hebrew_year';
251 cdecl; external;
236252
237253 (*************************************************************)
238254 (*************************************************************)
246262 @return Number of days since 3,1,3744
247263 *)
248264 function hdate_days_from_3744 (hebrew_year : cInt) : cInt;
249 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_days_from_3744';
265 cdecl; external;
250266
251267 (**
252268 @brief Return Hebrew year type based on size and first week day of year.
256272 @return the number for year type (1..14)
257273 *)
258274 function hdate_get_year_type (size_of_year, new_year_dw : cInt) : cInt;
259 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_year_type';
275 cdecl; external;
260276
261277 (**
262278 @brief Compute Julian day from Gregorian date
269285 @return the julian day number
270286 *)
271287 function hdate_gdate_to_jd (day, month, year : cInt) : cInt;
272 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_gdate_to_jd';
288 cdecl; external;
273289
274290 (**
275291 @brief Compute Julian day from Hebrew day, month and year
284300 @return the julian day number
285301 *)
286302 function hdate_hdate_to_jd (day, month, year : cInt; jd_tishrey1, jd_tishrey1_next_year : pcInt) : cInt;
287 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_hdate_to_jd';
303 cdecl; external;
288304
289305 (**
290306 @brief Converting from the Julian day to the Gregorian date
297313 @param year return Year in 4 digits e.g. 2001
298314 *)
299315 procedure hdate_jd_to_gdate (jd : cInt; day, month, year : pcInt);
300 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_jd_to_gdate';
316 cdecl; external;
301317
302318 (**
303319 @brief Converting from the Julian day to the Hebrew day
312328 @param jd_tishrey1_next_year return the julian number of 1 Tishrey next year
313329 *)
314330 procedure hdate_jd_to_hdate (jd : cInt; day, month, year, jd_tishrey1, jd_tishrey1_next_year : pcInt);
315 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_jd_to_hdate';
331 cdecl; external;
316332
317333 (*************************************************************)
318334 (*************************************************************)
326342 @return the days from 1 jan
327343 *)
328344 function hdate_get_day_of_year (day, month, year : cInt) : cInt;
329 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_day_of_year';
345 cdecl; external;
330346
331347 (**
332348 @brief utc sunrise/set time for a gregorian date
342358 @param sunset return the utc sunset in minutes after midnight (00:00)
343359 *)
344360 procedure hdate_get_utc_sun_time (day, month, year : cInt; latitude, longitude : cDouble; sunrise, sunset : pcInt);
345 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_utc_sun_time';
361 cdecl; external;
346362
347363 (*************************************************************)
348364 (*************************************************************)
354370 @return the Gregorian day of the month, 1..31.
355371 *)
356372 function hdate_get_gday (h : Phdate_struct) : cInt;
357 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_gday';
373 cdecl; external;
358374
359375 (**
360376 @brief get the Gregorian month
363379 @return the Gregorian month, jan = 1.
364380 *)
365381 function hdate_get_gmonth (h : Phdate_struct) : cInt;
366 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_gmonth';
382 cdecl; external;
367383
368384 (**
369385 @brief get the Gregorian year
372388 @return the Gregorian year.
373389 *)
374390 function hdate_get_gyear (h : Phdate_struct) : cInt;
375 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_gyear';
391 cdecl; external;
376392
377393 (**
378394 @brief get the Hebrew day of the month
381397 @return the Hebrew day of the month, 1..30.
382398 *)
383399 function hdate_get_hday (h : Phdate_struct) : cInt;
384 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_hday';
400 cdecl; external;
385401
386402 (**
387403 @brief get the Hebrew month
390406 @return the Hebrew month, Tishery = 1 .. Adar I =13, Adar II = 14.
391407 *)
392408 function hdate_get_hmonth (h : Phdate_struct) : cInt;
393 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_hmonth';
409 cdecl; external;
394410
395411 (**
396412 @brief get the Hebrew year
399415 @return the Hebrew year.
400416 *)
401417 function hdate_get_hyear (h : Phdate_struct) : cInt;
402 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_hyear';
418 cdecl; external;
403419
404420 (**
405421 @brief get the day of the week
408424 @return the the day of the week.
409425 *)
410426 function hdate_get_day_of_the_week (h : Phdate_struct) : cInt;
411 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_day_of_the_week';
427 cdecl; external;
412428
413429 (**
414430 @brief get the size of the hebrew year
417433 @return the the size of the hebrew year.
418434 *)
419435 function hdate_get_size_of_year (h : Phdate_struct) : cInt;
420 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_size_of_year';
436 cdecl; external;
421437
422438 (**
423439 @brief get the new year day of the week
426442 @return the the new year day of the week.
427443 *)
428444 function hdate_get_new_year_day_of_the_week (h : Phdate_struct) : cInt;
429 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_new_year_day_of_the_week';
445 cdecl; external;
430446
431447 (**
432448 @brief get the Julian day number
435451 @return the Julian day number.
436452 *)
437453 function hdate_get_julian (h : Phdate_struct) : cInt;
438 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_julian';
454 cdecl; external;
439455
440456 (**
441457 @brief get the number of days passed since 1 tishrey
444460 @return the number of days passed since 1 tishrey.
445461 *)
446462 function hdate_get_days (h : Phdate_struct) : cInt;
447 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_days';
463 cdecl; external;
448464
449465 (**
450466 @brief get the number of weeks passed since 1 tishrey
453469 @return the number of weeks passed since 1 tishrey.
454470 *)
455471 function hdate_get_weeks (h : Phdate_struct) : cInt;
456 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_weeks';
472 cdecl; external;
457473
458474 (*************************************************************)
459475 (*************************************************************)
464480 @return a new hdate object
465481 *)
466482 function new_hdate : Phdate_struct;
467 cdecl external LIBHDATE_LIBRARY_NAME name 'new_hdate';
483 cdecl; external;
468484
469485 (**
470486 @brief delete an hdate struct object.
472488 @param h pointer this hdate struct.
473489 *)
474490 function delete_hdate (h : Phdate_struct) : Phdate_struct;
475 cdecl external LIBHDATE_LIBRARY_NAME name 'delete_hdate';
491 cdecl; external;
476492
477493 (*************************************************************)
478494 (*************************************************************)
483499 @return a a static string, with the package name and version
484500 *)
485501 function hdate_get_version_string : PChar;
486 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_version_string';
502 cdecl; external;
487503
488504 (**
489505 @brief Return a static string, with the name of translator
491507 @return a a static string, with the name of translator
492508 *)
493509 function hdate_get_translator_string : PChar;
494 cdecl external LIBHDATE_LIBRARY_NAME name 'hdate_get_translator_string';
510 cdecl; external;
511
512 (**
513 @brief utc sun times for altitude at a gregorian date
514
515 @param day this day of month
516 @param month this month
517 @param year this year
518 @param latitude latitude to use in calculations
519 @param longitude longitude to use in calculations
520 @param deg degrees of sun's altitude (0 - Zenith .. 90 - Horizon)
521 @param sunrise return the utc sunrise in minutes
522 @param sunset return the utc sunset in minutes
523 *)
524 procedure hdate_get_utc_sun_time_deg(day, month, year : cint; latitude, longitude, deg : cdouble; sunrise, sunset : pcint);
525 cdecl; external;
526
527
528 (**
529 @brief utc sunrise/set time for a gregorian date
530
531 @param day this day of month
532 @param month this month
533 @param year this year
534 @param longitude longitude to use in calculations
535 @param latitude latitude to use in calculations
536 @param sun_hour return the length of shaa zmanit in minutes
537 @param first_light return the utc alut ha-shachar in minutes
538 @param talit return the utc tphilin and talit in minutes
539 @param sunrise return the utc sunrise in minutes
540 @param midday return the utc midday in minutes
541 @param sunset return the utc sunset in minutes
542 @param first_stars return the utc tzeit hacochavim in minutes
543 @param three_stars return the utc shlosha cochavim in minutes
544 *)
545 procedure hdate_get_utc_sun_time_full (day, month, year : cint;
546 latitude, longitude : cdouble;
547 sun_hour, first_light, talit, sunrise, midday, sunset,
548 first_stars, three_stars : pcint);
549 cdecl; external;
550
551
495552
496553 implementation
497554
+0
-321
current/bindings/pascal/hdate_class.pp less more
0 {
1 This unit create a Pascal object oriented class for libhdate.
2 This unit is created as a true object oriented class.
3
4 Copyright 2005 Ido Kanner <idokan@gmail.com>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Library General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 History:
21 19-21/05/2005 - Initial creation
22 }
23 {$IFDEF FPC}
24 {$MODE OBJFPC} {$H+}
25 {$ELSE}
26 {$Warning 'This code was tested with Free Pascal Only.'}
27 {$ENDIF}
28 unit hdate_class;
29
30 interface
31 uses hdate, SysUtils;
32
33 type
34 THdateClass = class
35 private
36 fh : Phdate_struct;
37 FToDestroy : Boolean;
38 fJulianDay : LongInt;
39 fDiaspora : Boolean;
40 fHolyday,
41 fHolydayType : LongInt;
42 fParasha : LongInt;
43 fHebrewDay,
44 fHebrewYear : String;
45
46 procedure InitValue;
47
48 procedure SetHebDay (Value : LongInt);
49 procedure SetGregDay (Value : LongInt);
50 procedure SetJulianDay (Value : LongInt);
51 procedure SetHebMonth (Value : LongInt);
52 procedure SetGregMonth (Value : LongInt);
53 procedure SetGregYear (Value : LongInt);
54 procedure SetHebYear (Value : LongInt);
55 procedure SetDiaspora (Value : Boolean);
56
57 function GetGregDay : LongInt;
58 function GetGregMonth : LongInt;
59 function GetGregYear : LongInt;
60 function GetHebDay : LongInt;
61 function GetHebMonth : LongInt;
62 function GetHebYear : LongInt;
63 public
64 constructor Create; virtual; overload;
65 constructor Create (hDateRec : Phdate_struct); virtual; overload;
66 destructor Destroy; override;
67
68 procedure Assign (Source : THdateClass); virtual;
69
70 function get_format_date (s : LongInt) : String;
71 function get_day_of_week_string (s : LongInt) : String;
72 function get_month_string (s : LongInt) : String;
73 function get_hebrew_month_string (s : LongInt) : String;
74 function get_holyday_string (s : LongInt) : String;
75 function get_parasha_string (s : LongInt) : String;
76 function GetDayOfWeek : LongInt;
77 function get_size_of_year : LongInt;
78 function get_new_year_day_of_the_week : LongInt;
79 function get_days : LongInt;
80 function get_weeks : LongInt;
81 function get_sunrise (latitude, longitude : Double; tz : LongInt) : LongInt;
82 function get_sunset (latitude, longitude : Double; tz : LongInt) : LongInt;
83
84 property Days : LongInt read get_days;
85 property DayOfWeek : LongInt read GetDayOfWeek;
86 property HebrewDay : String read fHebrewDay;
87 property HebrewYear : String read fHebrewYear;
88 property Holyday : LongInt read fHolyday;
89 property HolydayType : LongInt read fHolydayType;
90 property NewYearDayOfWeek : LongInt read get_new_year_day_of_the_week;
91 property Parasha : LongInt read fParasha;
92 property Weeks : LongInt read get_weeks;
93 property YearSize : Longint read get_size_of_year;
94 published
95 property HebDay : LongInt read GetHebDay write SetHebDay;
96 property GregDay : LongInt read GetGregDay write SetGregDay;
97 property Diaspora : Boolean read fDiaspora write SetDiaspora default True;
98 property JulianDay : LongInt read fJulianDay write SetJulianDay;
99 property HebMonth : LongInt read GetHebMonth write SetHebMonth;
100 property GregMonth : LongInt read GetGregMonth write SetGregMonth;
101 property ToDestroy : Boolean read FToDestroy write fToDestroy default True;
102 property GregYear : LongInt read GetGregYear write SetGregYear;
103 property HebYear : LongInt read GetHebYear write SetHebYear;
104 end;
105
106 implementation
107 uses DateUtils, cTypes;
108
109 procedure THdateClass.InitValue;
110 var
111 ADay, AMonth, AYear : Word;
112 begin
113 DecodeDate(SysUtils.Now, AYear, AMonth, ADay);
114
115 hdate_set_gdate (Fh, ADay, AMonth, AYear);
116
117 hdate_set_hdate (fh, hdate_get_hday (fh), hdate_get_hmonth (fh), hdate_get_hyear (fh));
118
119 fHebrewDay := StrPas (hdate_get_int_string (fh^.hd_day));
120 fHebrewYear := StrPas (hdate_get_int_string (fh^.hd_year));
121
122 SetJulianDay (hdate_gdate_to_jd (ADay, AMonth, AYear));
123 SetDiaspora (True);
124 end;
125
126 constructor THdateClass.Create;
127 begin
128 fh := nil;
129 fh := new_hdate;
130 fToDestroy := True;
131 InitValue;
132 end;
133
134 constructor THdateClass.Create (hDateRec : Phdate_struct);
135 begin
136 fh := hDateRec;
137 fToDestroy := False;
138 InitValue;
139 end;
140
141 destructor THdateClass.Destroy;
142 begin
143 if fToDestroy then
144 delete_hdate (fh);
145
146 inherited;
147 end;
148
149 procedure THdateClass.SetHebDay (Value : LongInt);
150 begin
151 hdate_set_hdate (Fh, Value, GetHebMonth, GetHebYear);
152 fHebrewDay := StrPas (hdate_get_int_string (fh^.hd_day));
153 end;
154
155 procedure THdateClass.SetGregDay (Value : LongInt);
156 begin
157 hdate_set_gdate (fh, Value, GetGregMonth, GetGregYear);
158 end;
159
160 procedure THdateClass.SetJulianDay (Value : LongInt);
161 begin
162 fJulianDay := Value;
163 hdate_set_jd (fh, fJulianDay);
164 end;
165
166 procedure THdateClass.SetHebMonth (Value : LongInt);
167 begin
168 hdate_set_hdate (Fh, GetHebDay, Value, GetHebYear);
169 end;
170
171 procedure THdateClass.SetGregMonth (Value : LongInt);
172 begin
173 hdate_set_gdate (fh, GetGregDay, Value, GetGregYear);
174 end;
175
176 procedure THdateClass.SetHebYear (Value : LongInt);
177 begin
178 hdate_set_hdate (fh, GetHebDay, GetGregMonth, Value);
179 fHebrewYear := StrPas (hdate_get_int_string (fh^.hd_year));
180 end;
181
182 procedure THdateClass.SetGregYear (Value : LongInt);
183 begin
184 hdate_set_gdate (fh, GetGregDay, GetGregMonth, Value);
185 end;
186
187 procedure THdateClass.SetDiaspora (Value : Boolean);
188 begin
189 fDiaspora := Value;
190 fHolyday := hdate_get_holyday (fh, cInt(FDiaspora));
191 fHolydayType := hdate_get_holyday_type (fHolyday);
192 fParasha := hdate_get_parasha (fh, cInt(fDiaspora));
193 end;
194
195 function THdateClass.GetGregDay : LongInt;
196 begin
197 Result := hdate_get_gday (fh);
198 end;
199
200 function THdateClass.GetGregMonth : LongInt;
201 begin
202 Result := hdate_get_gmonth (fh);
203 end;
204
205 function THdateClass.GetGregYear : LongInt;
206 begin
207 Result := hdate_get_gyear (fh);
208 end;
209
210 function THdateClass.GetHebDay : LongInt;
211 begin
212 Result := hdate_get_hday (fh);
213 end;
214
215 function THdateClass.GetHebMonth : LongInt;
216 begin
217 Result := hdate_get_hmonth (fh);
218 end;
219
220 function THdateClass.GetHebYear : LongInt;
221 begin
222 Result :=hdate_get_hyear (fh);
223 end;
224
225 procedure THdateClass.Assign (Source : THdateClass);
226 begin
227 if (not Assigned(Source)) then
228 begin
229 raise Exception.Create ('Source is not allocated.');
230 end;
231
232 Assert (Assigned(Source), 'Source is not allocated.'); // Should never happned ... but just in case...
233
234 fToDestroy := Source.ToDestroy;
235
236 HebDay := Source.HebDay;
237 GregDay := Source.GregDay;
238 HebMonth := Source.HebMonth;
239 GregMonth := Source.GregMonth;
240 HebYear := Source.HebYear;
241 GregYear := Source.GregYear;
242
243 SetJulianDay (Source.JulianDay);
244 SetDiaspora (Source.Diaspora);
245 end;
246
247 function THdateClass.get_format_date (s : LongInt) : String;
248 begin
249 Result := StrPas (hdate_get_format_date (fh, cInt(fDiaspora), s));
250 end;
251
252 function THdateClass.get_day_of_week_string (s : LongInt) : String;
253 begin
254 Result := StrPas (hdate_get_day_string (fh^.hd_dw, s));
255 end;
256
257 function THdateClass.get_month_string (s : LongInt) : String;
258 begin
259 Result := StrPas (hdate_get_month_string (fh^.gd_mon, s));
260 end;
261
262 function THdateClass.get_hebrew_month_string (s : LongInt) : String;
263 begin
264 Result := StrPas (hdate_get_hebrew_month_string (fh^.hd_mon, s));
265 end;
266
267 function THdateClass.get_holyday_string (s : LongInt) : String;
268 begin
269 Result := StrPas (hdate_get_holyday_string (fHolyday, s));
270 end;
271
272 function THdateClass.get_parasha_string (s : LongInt) : String;
273 begin
274 Result := StrPas (hdate_get_parasha_string (fParasha, s));
275 end;
276
277 function THdateClass.GetDayOfWeek : LongInt;
278 begin
279 Result := hdate_get_day_of_the_week (fh);
280 end;
281
282 function THdateClass.get_size_of_year : LongInt;
283 begin
284 Result := hdate_get_size_of_year (fh);
285 end;
286
287 function THdateClass.get_new_year_day_of_the_week : LongInt;
288 begin
289 Result := hdate_get_new_year_day_of_the_week (fh);
290 end;
291
292 function THdateClass.get_days : LongInt;
293 begin
294 Result := hdate_get_days (fh);
295 end;
296
297 function THdateClass.get_weeks : LongInt;
298 begin
299 Result := hdate_get_weeks (fh);
300 end;
301
302 function THdateClass.get_sunrise (latitude, longitude : Double; tz : LongInt) : LongInt;
303 var
304 sunrise,
305 sunset : cInt;
306 begin
307 hdate_get_utc_sun_time (fh^.gd_day, fh^.gd_mon, fh^.gd_year, latitude, longitude, @sunrise, @sunset);
308 Result := sunrise + tz * 60;
309 end;
310
311 function THdateClass.get_sunset (latitude, longitude : Double; tz : LongInt) : LongInt;
312 var
313 sunrise,
314 sunset : cInt;
315 begin
316 hdate_get_utc_sun_time (fh^.gd_day, fh^.gd_mon, fh^.gd_year, latitude, longitude, @sunrise, @sunset);
317 Result := sunset + tz * 60;
318 end;
319
320 end.
0
1 (* libhdate
2 Copyright (C) 1984-2003 Amos Shapir, 2004-2007 Yaacov Zamir <kzamir@walla.co.il>
3 Copyright (C) 2008 Ido Kanner <idokan@gmail.com>
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 History:
19 25/01/2008 - Fixed some logical bugs.
20 - Added FPDoc support
21 12/01/2008 - Added support for dynamic loading for the library
22 *)
23
24 Unit hdate_dyn_pascal;
25
26 {$IFDEF FPC}
27 {$MODE FPC}
28 {$PACKRECORDS C}
29 {$CALLING cdecl}
30 {$ENDIF}
31
32
33 (*
34 Auto load means that we are loading the functions when the unit is loaded.
35 Disable this define will mean that you should load and unload it by hand, using the needed procedures
36 *)
37 {$DEFINE AUTO_LOAD}
38
39 Interface
40
41 {$IFDEF FPC}
42
43 Uses
44 ctypes;
45 {$ENDIF}
46
47 { Load and assign the hdate library dynamiclly
48 Note: If AUTO_LOAD is defined, then no need to use this procedure
49 }
50 Procedure hdate_init;
51
52 { Free the memory from the hdate library loading
53 Note: If AUTO_LOAD is defined, then no need to use this procedure
54 }
55 Procedure hdate_done;
56
57 { Return true if the library was was loaded, or false if not }
58 Function IsLoaded : Boolean;
59
60 Const
61 {$IFDEF UNIX}
62 LIBHDATE_LIBRARY_NAME = 'libhdate.so';
63 {$ELSE}
64 {$IFDEF MSWINODWS}
65 LIBHDATE_LIBRARY_NAME = 'hdate.dll';
66 {$ELSE}
67 {$FATAL Unsupported environment}
68 {$ENDIF}
69 {$ENDIF}
70
71 (** @def HDATE_DIASPORA_FLAG
72 @brief use diaspora dates and holydays flag
73 *)
74 HDATE_DIASPORA_FLAG = -1;
75
76 (** @def HDATE_ISRAEL_FLAG
77 @brief use israel dates and holydays flag
78 *)
79 HDATE_ISRAEL_FLAG = 0;
80
81 (** @def HDATE_SHORT_FLAG
82 @brief use short strings flag
83 *)
84 HDATE_SHORT_FLAG = -1;
85
86 (** @def HDATE_LONG_FLAG
87 @brief use long strings flag
88 *)
89 HDATE_LONG_FLAG = 0;
90
91
92 { Base structore for hebrew dates }
93
94 Type
95 // A pointer to the Thdate_struct record
96 Phdate_struct = ^Thdate_struct;
97 Thdate_struct = Record
98 hd_day : cInt;
99 //The number of day in the hebrew month (1..31).
100 hd_mon : cInt;
101 //The number of the hebrew month 1..14 (1 - tishre, 13 - adar 1, 14 - adar 2).
102 hd_year : cInt;
103 //The number of the hebrew year.
104 gd_day : cInt;
105 //The number of the day in the month. (1..31)
106 gd_mon : cInt;
107 //The number of the month 1..12 (1 - jan).
108 gd_year : cInt;
109 //The number of the year.
110 hd_dw : cInt;
111 //The day of the week 1..7 (1 - sunday).
112 hd_size_of_year : cInt;
113 //The length of the year in days.
114 hd_new_year_dw : cInt;
115 //The week day of Hebrew new year.
116 hd_year_type : cInt;
117 //The number type of year.
118 hd_jd : cInt;
119 //The Julian day number
120 hd_days : cInt;
121 //The number of days passed since 1 tishrey
122 hd_weeks : cInt;
123 //The number of weeks passed since 1 tishrey
124 End;
125 (********************************************************************************)
126 (********************************************************************************)
127
128 Var
129 (**
130 @brief compute date structure from the Gregorian date
131
132 @param h pointer this hdate struct.
133 @param d Day of month 1..31
134 @param m Month 1..12
135 @param y Year in 4 digits e.g. 2001
136 @return pointer to this hdate struct
137 *)
138 hdate_set_gdate : Function (h : Phdate_struct; d, m, y : cInt) : Phdate_struct;
139
140
141 (**
142 @brief compute date structure from the Hebrew date
143
144 @param h pointer this hdate struct.
145 @param d Day of month 1..31
146 @param m Month 1..14 , (13 - Adar 1, 14 - Adar 2)
147 @param y Year in 4 digits e.g. 5731
148 @return pointer to this hdate struct
149 *)
150 hdate_set_hdate : Function (h : Phdate_struct; d, m, y : cInt) : Phdate_struct;
151
152
153 (**
154 @brief compute date structure from the Julian day
155
156 @param h pointer this hdate struct.
157 @param jd the julian day number.
158 @return pointer to this hdate struct
159 *)
160 hdate_set_jd : Function (h : Phdate_struct; jd : cInt) : Phdate_struct;
161
162 (*************************************************************)
163 (*************************************************************)
164
165
166 (**
167 @brief get formated hebrew date.
168
169 return the short ( e.g. "1 Tishrey" ) or
170 long (e.g. "Tuesday 18 Tishrey 5763 Hol hamoed Sukot" ) formated date.
171
172 @param h pointer this hdate struct.
173 @param diaspora if true give diaspora holydays.
174 @param s short flag.
175 @return a static string of foramted date
176 *)
177 hdate_get_format_date : Function (h : Phdate_struct; diaspora, s : cInt) : PChar;
178
179
180 (**
181 @brief get the number of hebrew parasha.
182
183 @param h pointer this hdate struct.
184 @param diaspora if true give diaspora readings
185 @return the number of parasha 1. Bereshit etc..
186 (55 trow 61 are joined strings e.g. Vayakhel Pekudei)
187 *)
188 hdate_get_parasha : Function (h : Phdate_struct; diaspora : cInt) : cInt;
189
190
191 (**
192 @brief get the number of hebrew holyday.
193
194 @param h pointer this hdate struct.
195 @param diaspora if true give diaspora holydays
196 @return the number of holyday.
197 *)
198 hdate_get_holyday : Function (h : Phdate_struct; diaspora : cInt) : cInt;
199
200 (*************************************************************)
201 (*************************************************************)
202
203
204 (**
205 @brief convert an integer to hebrew string.
206
207 @param n The int to convert
208 @return a static string of the hebrew number UTF-8 (logical)
209 @attention ( 0 < n < 10000)
210 *)
211 hdate_get_int_string : Function (n : cInt) : PChar;
212
213
214
215 (**
216 @brief get name of week day.
217
218 @param day The number of the day 1..7 (1 - sun).
219 @param s short flag
220 true - returns a short string: sun, false returns: sunday.
221 @return a static string of the day of the week
222 *)
223 hdate_get_day_string : Function (day : cInt; s : cInt) : PChar;
224
225
226
227 (**
228 @brief name of month.
229
230 @param month the number of the month 1..12 (1 - jan).
231 @param s short flag.
232 @return a static string of month name
233 *)
234 hdate_get_month_string : Function (month : cInt; s : cInt) : PChar;
235
236
237
238 (**
239 @brief name of hebrew month.
240
241 @param month the number of the month 1..14
242 (1 - tishre, 13 - adar 1, 14 - adar 2).
243 @param s short flag.
244 @return a static string of month name
245 *)
246 hdate_get_hebrew_month_string : Function (month : cInt; s : cInt) : PChar;
247
248
249
250 (**
251 @brief name of hebrew holyday.
252
253 @param holyday the holyday number.
254 @param s short flag.
255 @return a static string of holyday name
256 *)
257 hdate_get_holyday_string : Function (holyday, s : cInt) : PChar;
258
259
260
261 (**
262 @brief name of parasha
263
264 @param parasha the number of parasha 1-Bereshit
265 (55 trow 61 are joined strings e.g. Vayakhel Pekudei)
266 @param s short flag.
267 @return a static string of parasha name
268 *)
269 hdate_get_parasha_string : Function (parasha, s : cInt) : PChar;
270
271
272 (*************************************************************)
273 (*************************************************************)
274
275
276 (**
277 @brief get the hebrew holyday type.
278
279 @param holyday the holyday number.
280 @return the number of holyday type.
281 *)
282 hdate_get_holyday_type : Function (holyday : cInt) : cInt;
283
284
285
286 (**
287 @brief size of hebrew year in days.
288
289 @param hebrew_year the hebrew year.
290 @return size of Hebrew year
291 *)
292 hdate_get_size_of_hebrew_year : Function (hebrew_year : cInt) : cInt;
293
294
295 (*************************************************************)
296 (*************************************************************)
297
298
299 (**
300 @brief Days since Tishrey 3744
301
302 @author Amos Shapir 1984 (rev. 1985, 1992) Yaacov Zamir 2003-2005
303
304 @param hebrew_year The Hebrew year
305 @return Number of days since 3,1,3744
306 *)
307 hdate_days_from_3744 : Function (hebrew_year : cInt) : cInt;
308
309
310
311 (**
312 @brief Return Hebrew year type based on size and first week day of year.
313
314 @param size_of_year Length of year in days
315 @param new_year_dw First week day of year
316 @return the number for year type (1..14)
317 *)
318 hdate_get_year_type : Function (size_of_year, new_year_dw : cInt) : cInt;
319
320
321
322 (**
323 @brief Compute Julian day from Gregorian date
324
325 @author Yaacov Zamir (algorithm from Henry F. Fliegel and Thomas C. Van Flandern ,1968)
326
327 @param day Day of month 1..31
328 @param month Month 1..12
329 @param year Year in 4 digits e.g. 2001
330 @return the julian day number
331 *)
332 hdate_gdate_to_jd : Function (day, month, year : cInt) : cInt;
333
334
335
336 (**
337 @brief Compute Julian day from Hebrew day, month and year
338
339 @author Amos Shapir 1984 (rev. 1985, 1992) Yaacov Zamir 2003-2005
340
341 @param day Day of month 1..31
342 @param month Month 1..14 (13 - Adar 1, 14 - Adar 2)
343 @param year Hebrew year in 4 digits e.g. 5753
344 @param jd_tishrey1 return the julian number of 1 Tishrey this year
345 @param jd_tishrey1_next_year return the julian number of 1 Tishrey next year
346 @return the julian day number
347 *)
348 hdate_hdate_to_jd : Function (day, month, year : cInt; jd_tishrey1, jd_tishrey1_next_year : pcInt)
349 : cInt;
350
351
352
353 (**
354 @brief Converting from the Julian day to the Gregorian date
355
356 @author Yaacov Zamir (Algorithm, Henry F. Fliegel and Thomas C. Van Flandern ,1968)
357
358 @param jd Julian day
359 @param day return Day of month 1..31
360 @param month return Month 1..12
361 @param year return Year in 4 digits e.g. 2001
362 *)
363 hdate_jd_to_gdate : Procedure (jd : cInt; day, month, year : pcInt);
364
365
366
367 (**
368 @brief Converting from the Julian day to the Hebrew day
369
370 @author Yaacov Zamir 2005
371
372 @param jd Julian day
373 @param day return Day of month 1..31
374 @param month return Month 1..14 (13 - Adar 1, 14 - Adar 2)
375 @param year return Year in 4 digits e.g. 2001
376 @param jd_tishrey1 return the julian number of 1 Tishrey this year
377 @param jd_tishrey1_next_year return the julian number of 1 Tishrey next year
378 *)
379 hdate_jd_to_hdate : Procedure (jd : cInt; day, month, year, jd_tishrey1, jd_tishrey1_next_year :
380 pcInt);
381
382
383 (*************************************************************)
384 (*************************************************************)
385
386
387 (**
388 @brief days from 1 january
389
390 @param day this day of month
391 @param month this month
392 @param year this year
393 @return the days from 1 jan
394 *)
395 hdate_get_day_of_year : Function (day, month, year : cInt) : cInt;
396
397
398
399 (**
400 @brief utc sunrise/set time for a gregorian date
401
402 @param day this day of month
403 @param month this month
404 @param year this year
405 @param longitude longitude to use in calculations
406 degrees, negative values are east
407 @param latitude latitude to use in calculations
408 degrees, negative values are south
409 @param sunrise return the utc sunrise in minutes after midnight (00:00)
410 @param sunset return the utc sunset in minutes after midnight (00:00)
411 *)
412 hdate_get_utc_sun_time : Procedure (day, month, year : cInt; latitude, longitude : cDouble;
413 sunrise, sunset : pcInt);
414
415
416 (*************************************************************)
417 (*************************************************************)
418
419
420 (**
421 @brief get the Gregorian day of the month
422
423 @param h pointer this hdate struct.
424 @return the Gregorian day of the month, 1..31.
425 *)
426 hdate_get_gday : Function (h : Phdate_struct) : cInt;
427
428
429
430 (**
431 @brief get the Gregorian month
432
433 @param h pointer this hdate struct.
434 @return the Gregorian month, jan = 1.
435 *)
436 hdate_get_gmonth : Function (h : Phdate_struct) : cInt;
437
438
439
440 (**
441 @brief get the Gregorian year
442
443 @param h pointer this hdate struct.
444 @return the Gregorian year.
445 *)
446 hdate_get_gyear : Function (h : Phdate_struct) : cInt;
447
448
449
450 (**
451 @brief get the Hebrew day of the month
452
453 @param h pointer this hdate struct.
454 @return the Hebrew day of the month, 1..30.
455 *)
456 hdate_get_hday : Function (h : Phdate_struct) : cInt;
457
458
459
460 (**
461 @brief get the Hebrew month
462
463 @param h pointer this hdate struct.
464 @return the Hebrew month, Tishery = 1 .. Adar I =13, Adar II = 14.
465 *)
466 hdate_get_hmonth : Function (h : Phdate_struct) : cInt;
467
468
469 (**
470 @brief get the Hebrew year
471
472 @param h pointer this hdate struct.
473 @return the Hebrew year.
474 *)
475 hdate_get_hyear : Function (h : Phdate_struct) : cInt;
476
477
478
479 (**
480 @brief get the day of the week
481
482 @param h pointer this hdate struct.
483 @return the the day of the week.
484 *)
485 hdate_get_day_of_the_week : Function (h : Phdate_struct) : cInt;
486
487
488
489 (**
490 @brief get the size of the hebrew year
491
492 @param h pointer this hdate struct.
493 @return the the size of the hebrew year.
494 *)
495 hdate_get_size_of_year : Function (h : Phdate_struct) : cInt;
496
497
498
499 (**
500 @brief get the new year day of the week
501
502 @param h pointer this hdate struct.
503 @return the the new year day of the week.
504 *)
505 hdate_get_new_year_day_of_the_week : Function (h : Phdate_struct) : cInt;
506
507
508
509 (**
510 @brief get the Julian day number
511
512 @param h pointer this hdate struct.
513 @return the Julian day number.
514 *)
515 hdate_get_julian : Function (h : Phdate_struct) : cInt;
516
517
518
519 (**
520 @brief get the number of days passed since 1 tishrey
521
522 @param h pointer this hdate struct.
523 @return the number of days passed since 1 tishrey.
524 *)
525 hdate_get_days : Function (h : Phdate_struct) : cInt;
526
527
528
529 (**
530 @brief get the number of weeks passed since 1 tishrey
531
532 @param h pointer this hdate struct.
533 @return the number of weeks passed since 1 tishrey.
534 *)
535 hdate_get_weeks : Function (h : Phdate_struct) : cInt;
536
537
538 (*************************************************************)
539 (*************************************************************)
540
541
542 (**
543 @brief creat a new hdate struct object, must be deleted using delete_hdate.
544
545 @return a new hdate object
546 *)
547 new_hdate : Function : Phdate_struct;
548
549
550 (**
551 @brief delete an hdate struct object.
552
553 @param h pointer this hdate struct.
554 *)
555 delete_hdate : Function (h : Phdate_struct) : Phdate_struct;
556
557
558 (*************************************************************)
559 (*************************************************************)
560
561
562 (**
563 @brief Return a static string, with the package name and version
564
565 @return a a static string, with the package name and version
566 *)
567 hdate_get_version_string : Function : PChar;
568
569
570 (**
571 @brief Return a static string, with the name of translator
572
573 @return a a static string, with the name of translator
574 *)
575 hdate_get_translator_string : Function : PChar;
576
577
578 (**
579 @brief utc sun times for altitude at a gregorian date
580
581 @param day this day of month
582 @param month this month
583 @param year this year
584 @param latitude latitude to use in calculations
585 @param longitude longitude to use in calculations
586 @param deg degrees of sun's altitude (0 - Zenith .. 90 - Horizon)
587 @param sunrise return the utc sunrise in minutes
588 @param sunset return the utc sunset in minutes
589 *)
590 hdate_get_utc_sun_time_deg : Procedure (day, month, year : cint;
591 latitude, longitude, deg : cdouble;
592 sunrise, sunset : pcint);
593
594
595 (**
596 @brief utc sunrise/set time for a gregorian date
597
598 @param day this day of month
599 @param month this month
600 @param year this year
601 @param longitude longitude to use in calculations
602 @param latitude latitude to use in calculations
603 @param sun_hour return the length of shaa zmanit in minutes
604 @param first_light return the utc alut ha-shachar in minutes
605 @param talit return the utc tphilin and talit in minutes
606 @param sunrise return the utc sunrise in minutes
607 @param midday return the utc midday in minutes
608 @param sunset return the utc sunset in minutes
609 @param first_stars return the utc tzeit hacochavim in minutes
610 @param three_stars return the utc shlosha cochavim in minutes
611 *)
612 hdate_get_utc_sun_time_full : Procedure (day, month, year : cint;
613 latitude, longitude : cdouble;
614 sun_hour, first_light, talit, sunrise, midday, sunset,
615 first_stars, three_stars : pcint);
616
617
618 Implementation
619 Uses dynlibs;
620
621 Var
622 Loaded : Boolean;
623 LibHandle : TLibHandle;
624
625 Procedure hdate_init;
626
627 { Internal function of hdate_init, that load the function and assign it to the right function/procedure}
628 Function AssignProc(Name : PChar; Fnc : Pointer) : boolean;
629 Var
630 address : pointer;
631 pfnc : ^pointer;
632 Begin
633 address := Nil;
634 address := GetProcedureAddress(LibHandle, Name);
635 pfnc := Fnc;
636 pfnc^ := address;
637 AssignProc := address <> Nil;
638 End;
639
640 Begin
641 If (Loaded) and (LibHandle <> NilHandle) Then
642 exit;
643
644 Loaded := False;
645 LibHandle := LoadLibrary(LIBHDATE_LIBRARY_NAME);
646 If LibHandle = NilHandle Then
647 exit;
648
649 If Not AssignProc('hdate_set_gdate', @hdate_set_gdate) Then
650 exit;
651 If Not AssignProc('hdate_set_hdate', @hdate_set_hdate) Then
652 exit;
653 If Not AssignProc('hdate_set_jd', @hdate_set_jd) Then
654 exit;
655 If Not AssignProc('hdate_get_format_date', @hdate_get_format_date) Then
656 exit;
657 If Not AssignProc('hdate_get_parasha', @hdate_get_parasha) Then
658 exit;
659 If Not AssignProc('hdate_get_holyday', @hdate_get_holyday) Then
660 exit;
661 If Not AssignProc('hdate_get_int_string', @hdate_get_int_string) Then
662 exit;
663 If Not AssignProc('hdate_get_day_string', @hdate_get_day_string) Then
664 exit;
665 If Not AssignProc('hdate_get_month_string', @hdate_get_month_string) Then
666 exit;
667 If Not AssignProc('hdate_get_hebrew_month_string', @hdate_get_hebrew_month_string) Then
668 exit;
669 If Not AssignProc('hdate_get_holyday_string', @hdate_get_holyday_string) Then
670 exit;
671 If Not AssignProc('hdate_get_parasha_string', @hdate_get_parasha_string) Then
672 exit;
673 If Not AssignProc('hdate_get_holyday_type', @hdate_get_holyday_type) Then
674 exit;
675 If Not AssignProc('hdate_get_size_of_hebrew_year', @hdate_get_size_of_hebrew_year) Then
676 exit;
677 If Not AssignProc('hdate_days_from_3744', @hdate_days_from_3744) Then
678 exit;
679 If Not AssignProc('hdate_get_year_type', @hdate_get_year_type) Then
680 exit;
681 If Not AssignProc('hdate_gdate_to_jd', @hdate_gdate_to_jd) Then
682 exit;
683 If Not AssignProc('hdate_hdate_to_jd', @hdate_hdate_to_jd) Then
684 exit;
685 If Not AssignProc('hdate_jd_to_gdate', @hdate_jd_to_gdate) Then
686 exit;
687 If Not AssignProc('hdate_jd_to_hdate', @hdate_jd_to_hdate) Then
688 exit;
689 If Not AssignProc('hdate_get_day_of_year', @hdate_get_day_of_year) Then
690 exit;
691 If Not AssignProc('hdate_get_utc_sun_time', @hdate_get_utc_sun_time) Then
692 exit;
693 If Not AssignProc('hdate_get_gday', @hdate_get_gday) Then
694 exit;
695 If Not AssignProc('hdate_get_gmonth', @hdate_get_gmonth) Then
696 exit;
697 If Not AssignProc('hdate_get_gyear', @hdate_get_gyear) Then
698 exit;
699 If Not AssignProc('hdate_get_hday', @hdate_get_hday) Then
700 exit;
701 If Not AssignProc('hdate_get_hmonth', @hdate_get_hmonth) Then
702 exit;
703 If Not AssignProc('hdate_get_hyear', @hdate_get_hyear) Then
704 exit;
705 If Not AssignProc('hdate_get_day_of_the_week', @hdate_get_day_of_the_week) Then
706 exit;
707 If Not AssignProc('hdate_get_size_of_year', @hdate_get_size_of_year) Then
708 exit;
709 If Not AssignProc('hdate_get_new_year_day_of_the_week', @hdate_get_new_year_day_of_the_week) Then
710 exit;
711 If Not AssignProc('hdate_get_julian', @hdate_get_julian) Then
712 exit;
713 If Not AssignProc('hdate_get_days', @hdate_get_days) Then
714 exit;
715 If Not AssignProc('hdate_get_weeks', @hdate_get_weeks) Then
716 exit;
717 If Not AssignProc('new_hdate', @new_hdate) Then
718 exit;
719 If Not AssignProc('delete_hdate', @delete_hdate) Then
720 exit;
721 If Not AssignProc('hdate_get_version_string', @hdate_get_version_string) Then
722 exit;
723 If Not AssignProc('hdate_get_translator_string', @hdate_get_translator_string) Then
724 exit;
725 If Not AssignProc('hdate_get_utc_sun_time_deg', @hdate_get_utc_sun_time_deg) Then
726 exit;
727 If Not AssignProc('hdate_get_utc_sun_time_full', @hdate_get_utc_sun_time_full) Then
728 exit;
729
730 Loaded := true;
731 End;
732
733 Procedure hdate_done;
734 Begin
735 If LibHandle <> NilHandle Then
736 UnloadLibrary(LibHandle);
737
738 LibHandle := NilHandle;
739 Loaded := false;
740 End;
741
742 Function IsLoaded : Boolean;
743 Begin
744 IsLoaded := Loaded;
745 End;
746
747 initialization
748 Loaded := false;
749 {$IFDEF AUTO_LOAD}
750 hdate_init;
751 {$ENDIF}
752 finalization
753 {$IFDEF AUTO_LOAD}
754 hdate_done;
755 {$ENDIF}
756 End.
757
119119 PA_VERSION = @PA_VERSION@
120120 PE_CFLAGS = @PE_CFLAGS@
121121 PE_MODULES_PATH = @PE_MODULES_PATH@
122 PH_CONFIG_PATH = @PH_CONFIG_PATH@
123 PH_MODULES_PATH = @PH_MODULES_PATH@
122124 PKG_CONFIG = @PKG_CONFIG@
123125 POSUB = @POSUB@
124126 PY_CFLAGS = @PY_CFLAGS@
125127 PY_MODULES_PATH = @PY_MODULES_PATH@
126128 PY_VERSION = @PY_VERSION@
127129 RANLIB = @RANLIB@
130 RU_CFLAGS = @RU_CFLAGS@
131 RU_MODULES_PATH = @RU_MODULES_PATH@
132 RU_VERSION = @RU_VERSION@
128133 SED = @SED@
129134 SET_MAKE = @SET_MAKE@
130135 SHELL = @SHELL@
138143 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
139144 WITH_PERL_FALSE = @WITH_PERL_FALSE@
140145 WITH_PERL_TRUE = @WITH_PERL_TRUE@
146 WITH_PHP_FALSE = @WITH_PHP_FALSE@
147 WITH_PHP_TRUE = @WITH_PHP_TRUE@
141148 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
142149 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
150 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
151 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
143152 XGETTEXT = @XGETTEXT@
144153 XGETTEXT_015 = @XGETTEXT_015@
145154 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
168177 exec_prefix = @exec_prefix@
169178 have_pascal = @have_pascal@
170179 have_perl = @have_perl@
180 have_php = @have_php@
181 have_php_config = @have_php_config@
171182 have_python = @have_python@
183 have_ruby = @have_ruby@
172184 have_swig = @have_swig@
173185 host = @host@
174186 host_alias = @host_alias@
0
1 EXTRA_DIST = hdate.i hdate.ini
2
3 if WITH_PHP
4
5 DEPS= $(top_builddir)/src/libhdate.la
6
7 CLEANFILES = *.o *.cpp *.h *.so *wrap*
8
9 all-am: hdate.so
10
11
12 hdate.so: hdate_wrap.cpp
13 g++ -I$(top_srcdir)/src `php-config --includes` -fpic -c hdate_wrap.cpp
14 gcc -shared ../../src/.libs/libhdate.so hdate_wrap.o -lstdc++ -o hdate.so
15
16 hdate_wrap.cpp: hdate.i
17 swig -php5 -c++ hdate.i
18
19 install-data-local: hdate.so hdate.ini
20 $(mkinstalldirs) $(DESTDIR)$(PH_MODULES_PATH)
21 $(INSTALL_DATA) hdate.so $(DESTDIR)$(PH_MODULES_PATH)/hdate.so
22
23 $(mkinstalldirs) $(DESTDIR)$(PH_CONFIG_PATH)
24 $(INSTALL_DATA) hdate.ini $(DESTDIR)$(PH_CONFIG_PATH)/hdate.ini
25 endif
0 # Makefile.in generated by automake 1.9.6 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 pkgdatadir = $(datadir)/@PACKAGE@
19 pkglibdir = $(libdir)/@PACKAGE@
20 pkgincludedir = $(includedir)/@PACKAGE@
21 top_builddir = ../..
22 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23 INSTALL = @INSTALL@
24 install_sh_DATA = $(install_sh) -c -m 644
25 install_sh_PROGRAM = $(install_sh) -c
26 install_sh_SCRIPT = $(install_sh) -c
27 INSTALL_HEADER = $(INSTALL_DATA)
28 transform = $(program_transform_name)
29 NORMAL_INSTALL = :
30 PRE_INSTALL = :
31 POST_INSTALL = :
32 NORMAL_UNINSTALL = :
33 PRE_UNINSTALL = :
34 POST_UNINSTALL = :
35 build_triplet = @build@
36 host_triplet = @host@
37 subdir = bindings/php
38 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
41 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
42 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
43 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
44 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
45 $(top_srcdir)/configure.in
46 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
47 $(ACLOCAL_M4)
48 mkinstalldirs = $(install_sh) -d
49 CONFIG_CLEAN_FILES =
50 SOURCES =
51 DIST_SOURCES =
52 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
53 ACLOCAL = @ACLOCAL@
54 AMDEP_FALSE = @AMDEP_FALSE@
55 AMDEP_TRUE = @AMDEP_TRUE@
56 AMTAR = @AMTAR@
57 AR = @AR@
58 AUTOCONF = @AUTOCONF@
59 AUTOHEADER = @AUTOHEADER@
60 AUTOMAKE = @AUTOMAKE@
61 AWK = @AWK@
62 CC = @CC@
63 CCDEPMODE = @CCDEPMODE@
64 CFLAGS = @CFLAGS@
65 CPP = @CPP@
66 CPPFLAGS = @CPPFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 CXXDEPMODE = @CXXDEPMODE@
70 CXXFLAGS = @CXXFLAGS@
71 CYGPATH_W = @CYGPATH_W@
72 DATADIRNAME = @DATADIRNAME@
73 DEFS = @DEFS@
74 DEPDIR = @DEPDIR@
75 ECHO = @ECHO@
76 ECHO_C = @ECHO_C@
77 ECHO_N = @ECHO_N@
78 ECHO_T = @ECHO_T@
79 EGREP = @EGREP@
80 EXEEXT = @EXEEXT@
81 F77 = @F77@
82 FFLAGS = @FFLAGS@
83 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
84 GMSGFMT = @GMSGFMT@
85 GMSGFMT_015 = @GMSGFMT_015@
86 GREP = @GREP@
87 INSTALL_DATA = @INSTALL_DATA@
88 INSTALL_PROGRAM = @INSTALL_PROGRAM@
89 INSTALL_SCRIPT = @INSTALL_SCRIPT@
90 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
91 INTLLIBS = @INTLLIBS@
92 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
93 LDFLAGS = @LDFLAGS@
94 LIBICONV = @LIBICONV@
95 LIBINTL = @LIBINTL@
96 LIBOBJS = @LIBOBJS@
97 LIBS = @LIBS@
98 LIBTOOL = @LIBTOOL@
99 LN_S = @LN_S@
100 LTLIBICONV = @LTLIBICONV@
101 LTLIBINTL = @LTLIBINTL@
102 LTLIBOBJS = @LTLIBOBJS@
103 MAINT = @MAINT@
104 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
105 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
106 MAKEINFO = @MAKEINFO@
107 MSGFMT = @MSGFMT@
108 MSGFMT_015 = @MSGFMT_015@
109 MSGMERGE = @MSGMERGE@
110 OBJEXT = @OBJEXT@
111 PACKAGE = @PACKAGE@
112 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
113 PACKAGE_NAME = @PACKAGE_NAME@
114 PACKAGE_STRING = @PACKAGE_STRING@
115 PACKAGE_TARNAME = @PACKAGE_TARNAME@
116 PACKAGE_VERSION = @PACKAGE_VERSION@
117 PATH_SEPARATOR = @PATH_SEPARATOR@
118 PA_MODULES_PATH = @PA_MODULES_PATH@
119 PA_VERSION = @PA_VERSION@
120 PE_CFLAGS = @PE_CFLAGS@
121 PE_MODULES_PATH = @PE_MODULES_PATH@
122 PH_CONFIG_PATH = @PH_CONFIG_PATH@
123 PH_MODULES_PATH = @PH_MODULES_PATH@
124 PKG_CONFIG = @PKG_CONFIG@
125 POSUB = @POSUB@
126 PY_CFLAGS = @PY_CFLAGS@
127 PY_MODULES_PATH = @PY_MODULES_PATH@
128 PY_VERSION = @PY_VERSION@
129 RANLIB = @RANLIB@
130 RU_CFLAGS = @RU_CFLAGS@
131 RU_MODULES_PATH = @RU_MODULES_PATH@
132 RU_VERSION = @RU_VERSION@
133 SED = @SED@
134 SET_MAKE = @SET_MAKE@
135 SHELL = @SHELL@
136 STRIP = @STRIP@
137 USE_NLS = @USE_NLS@
138 VERSION = @VERSION@
139 VERSION_INFO = @VERSION_INFO@
140 WITH_HCAL_FALSE = @WITH_HCAL_FALSE@
141 WITH_HCAL_TRUE = @WITH_HCAL_TRUE@
142 WITH_PASCAL_FALSE = @WITH_PASCAL_FALSE@
143 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
144 WITH_PERL_FALSE = @WITH_PERL_FALSE@
145 WITH_PERL_TRUE = @WITH_PERL_TRUE@
146 WITH_PHP_FALSE = @WITH_PHP_FALSE@
147 WITH_PHP_TRUE = @WITH_PHP_TRUE@
148 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
149 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
150 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
151 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
152 XGETTEXT = @XGETTEXT@
153 XGETTEXT_015 = @XGETTEXT_015@
154 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
155 ac_ct_CC = @ac_ct_CC@
156 ac_ct_CXX = @ac_ct_CXX@
157 ac_ct_F77 = @ac_ct_F77@
158 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
159 am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
160 am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
161 am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
162 am__include = @am__include@
163 am__leading_dot = @am__leading_dot@
164 am__quote = @am__quote@
165 am__tar = @am__tar@
166 am__untar = @am__untar@
167 bindir = @bindir@
168 build = @build@
169 build_alias = @build_alias@
170 build_cpu = @build_cpu@
171 build_os = @build_os@
172 build_vendor = @build_vendor@
173 datadir = @datadir@
174 datarootdir = @datarootdir@
175 docdir = @docdir@
176 dvidir = @dvidir@
177 exec_prefix = @exec_prefix@
178 have_pascal = @have_pascal@
179 have_perl = @have_perl@
180 have_php = @have_php@
181 have_php_config = @have_php_config@
182 have_python = @have_python@
183 have_ruby = @have_ruby@
184 have_swig = @have_swig@
185 host = @host@
186 host_alias = @host_alias@
187 host_cpu = @host_cpu@
188 host_os = @host_os@
189 host_vendor = @host_vendor@
190 htmldir = @htmldir@
191 includedir = @includedir@
192 infodir = @infodir@
193 install_sh = @install_sh@
194 libdir = @libdir@
195 libexecdir = @libexecdir@
196 localedir = @localedir@
197 localstatedir = @localstatedir@
198 mandir = @mandir@
199 mkdir_p = @mkdir_p@
200 oldincludedir = @oldincludedir@
201 pdfdir = @pdfdir@
202 prefix = @prefix@
203 program_transform_name = @program_transform_name@
204 psdir = @psdir@
205 sbindir = @sbindir@
206 sharedstatedir = @sharedstatedir@
207 sysconfdir = @sysconfdir@
208 target_alias = @target_alias@
209 EXTRA_DIST = hdate.i hdate.ini
210 @WITH_PHP_TRUE@DEPS = $(top_builddir)/src/libhdate.la
211 @WITH_PHP_TRUE@CLEANFILES = *.o *.cpp *.h *.so *wrap*
212 all: all-am
213
214 .SUFFIXES:
215 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
216 @for dep in $?; do \
217 case '$(am__configure_deps)' in \
218 *$$dep*) \
219 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
220 && exit 0; \
221 exit 1;; \
222 esac; \
223 done; \
224 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/php/Makefile'; \
225 cd $(top_srcdir) && \
226 $(AUTOMAKE) --gnu bindings/php/Makefile
227 .PRECIOUS: Makefile
228 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
229 @case '$?' in \
230 *config.status*) \
231 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
232 *) \
233 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
234 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
235 esac;
236
237 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
238 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
239
240 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
241 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
242 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
243 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
244
245 mostlyclean-libtool:
246 -rm -f *.lo
247
248 clean-libtool:
249 -rm -rf .libs _libs
250
251 distclean-libtool:
252 -rm -f libtool
253 uninstall-info-am:
254 tags: TAGS
255 TAGS:
256
257 ctags: CTAGS
258 CTAGS:
259
260
261 distdir: $(DISTFILES)
262 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
263 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
264 list='$(DISTFILES)'; for file in $$list; do \
265 case $$file in \
266 $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
267 $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
268 esac; \
269 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
270 dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
271 if test "$$dir" != "$$file" && test "$$dir" != "."; then \
272 dir="/$$dir"; \
273 $(mkdir_p) "$(distdir)$$dir"; \
274 else \
275 dir=''; \
276 fi; \
277 if test -d $$d/$$file; then \
278 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
279 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
280 fi; \
281 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
282 else \
283 test -f $(distdir)/$$file \
284 || cp -p $$d/$$file $(distdir)/$$file \
285 || exit 1; \
286 fi; \
287 done
288 check-am: all-am
289 check: check-am
290 all-am: Makefile
291 installdirs:
292 install: install-am
293 install-exec: install-exec-am
294 install-data: install-data-am
295 uninstall: uninstall-am
296
297 install-am: all-am
298 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
299
300 installcheck: installcheck-am
301 install-strip:
302 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
303 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
304 `test -z '$(STRIP)' || \
305 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
306 mostlyclean-generic:
307
308 clean-generic:
309 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
310
311 distclean-generic:
312 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
313
314 maintainer-clean-generic:
315 @echo "This command is intended for maintainers to use"
316 @echo "it deletes files that may require special tools to rebuild."
317 @WITH_PHP_FALSE@install-data-local:
318 clean: clean-am
319
320 clean-am: clean-generic clean-libtool mostlyclean-am
321
322 distclean: distclean-am
323 -rm -f Makefile
324 distclean-am: clean-am distclean-generic distclean-libtool
325
326 dvi: dvi-am
327
328 dvi-am:
329
330 html: html-am
331
332 info: info-am
333
334 info-am:
335
336 install-data-am: install-data-local
337
338 install-exec-am:
339
340 install-info: install-info-am
341
342 install-man:
343
344 installcheck-am:
345
346 maintainer-clean: maintainer-clean-am
347 -rm -f Makefile
348 maintainer-clean-am: distclean-am maintainer-clean-generic
349
350 mostlyclean: mostlyclean-am
351
352 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
353
354 pdf: pdf-am
355
356 pdf-am:
357
358 ps: ps-am
359
360 ps-am:
361
362 uninstall-am: uninstall-info-am
363
364 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
365 distclean distclean-generic distclean-libtool distdir dvi \
366 dvi-am html html-am info info-am install install-am \
367 install-data install-data-am install-data-local install-exec \
368 install-exec-am install-info install-info-am install-man \
369 install-strip installcheck installcheck-am installdirs \
370 maintainer-clean maintainer-clean-generic mostlyclean \
371 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
372 uninstall uninstall-am uninstall-info-am
373
374
375 @WITH_PHP_TRUE@all-am: hdate.so
376
377 @WITH_PHP_TRUE@hdate.so: hdate_wrap.cpp
378 @WITH_PHP_TRUE@ g++ -I$(top_srcdir)/src `php-config --includes` -fpic -c hdate_wrap.cpp
379 @WITH_PHP_TRUE@ gcc -shared ../../src/.libs/libhdate.so hdate_wrap.o -lstdc++ -o hdate.so
380
381 @WITH_PHP_TRUE@hdate_wrap.cpp: hdate.i
382 @WITH_PHP_TRUE@ swig -php5 -c++ hdate.i
383
384 @WITH_PHP_TRUE@install-data-local: hdate.so hdate.ini
385 @WITH_PHP_TRUE@ $(mkinstalldirs) $(DESTDIR)$(PH_MODULES_PATH)
386 @WITH_PHP_TRUE@ $(INSTALL_DATA) hdate.so $(DESTDIR)$(PH_MODULES_PATH)/hdate.so
387
388 @WITH_PHP_TRUE@ $(mkinstalldirs) $(DESTDIR)$(PH_CONFIG_PATH)
389 @WITH_PHP_TRUE@ $(INSTALL_DATA) hdate.ini $(DESTDIR)$(PH_CONFIG_PATH)/hdate.ini
390 # Tell versions [3.59,3.63) of GNU make to not export all variables.
391 # Otherwise a system limit (for SysV at least) may be exceeded.
392 .NOEXPORT:
0 // file : hdate.i
1 %module hdate
2 %{
3 #include "../../src/hdatepp.h"
4 %}
5
6 %include ../../src/hdatepp.h
7
8
0 # configuration for php hdate module
1 extension=hdate.so
119119 PA_VERSION = @PA_VERSION@
120120 PE_CFLAGS = @PE_CFLAGS@
121121 PE_MODULES_PATH = @PE_MODULES_PATH@
122 PH_CONFIG_PATH = @PH_CONFIG_PATH@
123 PH_MODULES_PATH = @PH_MODULES_PATH@
122124 PKG_CONFIG = @PKG_CONFIG@
123125 POSUB = @POSUB@
124126 PY_CFLAGS = @PY_CFLAGS@
125127 PY_MODULES_PATH = @PY_MODULES_PATH@
126128 PY_VERSION = @PY_VERSION@
127129 RANLIB = @RANLIB@
130 RU_CFLAGS = @RU_CFLAGS@
131 RU_MODULES_PATH = @RU_MODULES_PATH@
132 RU_VERSION = @RU_VERSION@
128133 SED = @SED@
129134 SET_MAKE = @SET_MAKE@
130135 SHELL = @SHELL@
138143 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
139144 WITH_PERL_FALSE = @WITH_PERL_FALSE@
140145 WITH_PERL_TRUE = @WITH_PERL_TRUE@
146 WITH_PHP_FALSE = @WITH_PHP_FALSE@
147 WITH_PHP_TRUE = @WITH_PHP_TRUE@
141148 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
142149 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
150 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
151 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
143152 XGETTEXT = @XGETTEXT@
144153 XGETTEXT_015 = @XGETTEXT_015@
145154 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
168177 exec_prefix = @exec_prefix@
169178 have_pascal = @have_pascal@
170179 have_perl = @have_perl@
180 have_php = @have_php@
181 have_php_config = @have_php_config@
171182 have_python = @have_python@
183 have_ruby = @have_ruby@
172184 have_swig = @have_swig@
173185 host = @host@
174186 host_alias = @host_alias@
0
1 EXTRA_DIST = hdate.i
2
3 if WITH_RUBY
4
5 DEPS= $(top_builddir)/src/libhdate.la
6
7 CLEANFILES = *.o *.cxx *.so *wrap*
8
9 all-am: hdate.so
10
11
12 hdate.so: hdate_wrap.cxx
13 g++ -fpic -fno-strict-aliasing -g -O2 -c hdate_wrap.cxx $(RU_CFLAGS) -I$(top_srcdir)/src
14 gcc -shared ../../src/.libs/libhdate.so hdate_wrap.o -rdynamic -Wl,-export-dynamic -lruby$(RU_VERSION) -lpthread -ldl -lcrypt -lm -lc -lstdc++ -o hdate.so
15
16 hdate_wrap.cxx: hdate.i
17 swig -c++ -ruby hdate.i
18
19 install-data-local: hdate.so
20 $(mkinstalldirs) $(DESTDIR)$(RU_MODULES_PATH)
21 $(INSTALL_DATA) hdate.so $(DESTDIR)$(RU_MODULES_PATH)/hdate.so
22
23 endif
0 # Makefile.in generated by automake 1.9.6 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18 pkgdatadir = $(datadir)/@PACKAGE@
19 pkglibdir = $(libdir)/@PACKAGE@
20 pkgincludedir = $(includedir)/@PACKAGE@
21 top_builddir = ../..
22 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23 INSTALL = @INSTALL@
24 install_sh_DATA = $(install_sh) -c -m 644
25 install_sh_PROGRAM = $(install_sh) -c
26 install_sh_SCRIPT = $(install_sh) -c
27 INSTALL_HEADER = $(INSTALL_DATA)
28 transform = $(program_transform_name)
29 NORMAL_INSTALL = :
30 PRE_INSTALL = :
31 POST_INSTALL = :
32 NORMAL_UNINSTALL = :
33 PRE_UNINSTALL = :
34 POST_UNINSTALL = :
35 build_triplet = @build@
36 host_triplet = @host@
37 subdir = bindings/ruby
38 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
41 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
42 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
43 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
44 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
45 $(top_srcdir)/configure.in
46 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
47 $(ACLOCAL_M4)
48 mkinstalldirs = $(install_sh) -d
49 CONFIG_CLEAN_FILES =
50 SOURCES =
51 DIST_SOURCES =
52 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
53 ACLOCAL = @ACLOCAL@
54 AMDEP_FALSE = @AMDEP_FALSE@
55 AMDEP_TRUE = @AMDEP_TRUE@
56 AMTAR = @AMTAR@
57 AR = @AR@
58 AUTOCONF = @AUTOCONF@
59 AUTOHEADER = @AUTOHEADER@
60 AUTOMAKE = @AUTOMAKE@
61 AWK = @AWK@
62 CC = @CC@
63 CCDEPMODE = @CCDEPMODE@
64 CFLAGS = @CFLAGS@
65 CPP = @CPP@
66 CPPFLAGS = @CPPFLAGS@
67 CXX = @CXX@
68 CXXCPP = @CXXCPP@
69 CXXDEPMODE = @CXXDEPMODE@
70 CXXFLAGS = @CXXFLAGS@
71 CYGPATH_W = @CYGPATH_W@
72 DATADIRNAME = @DATADIRNAME@
73 DEFS = @DEFS@
74 DEPDIR = @DEPDIR@
75 ECHO = @ECHO@
76 ECHO_C = @ECHO_C@
77 ECHO_N = @ECHO_N@
78 ECHO_T = @ECHO_T@
79 EGREP = @EGREP@
80 EXEEXT = @EXEEXT@
81 F77 = @F77@
82 FFLAGS = @FFLAGS@
83 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
84 GMSGFMT = @GMSGFMT@
85 GMSGFMT_015 = @GMSGFMT_015@
86 GREP = @GREP@
87 INSTALL_DATA = @INSTALL_DATA@
88 INSTALL_PROGRAM = @INSTALL_PROGRAM@
89 INSTALL_SCRIPT = @INSTALL_SCRIPT@
90 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
91 INTLLIBS = @INTLLIBS@
92 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
93 LDFLAGS = @LDFLAGS@
94 LIBICONV = @LIBICONV@
95 LIBINTL = @LIBINTL@
96 LIBOBJS = @LIBOBJS@
97 LIBS = @LIBS@
98 LIBTOOL = @LIBTOOL@
99 LN_S = @LN_S@
100 LTLIBICONV = @LTLIBICONV@
101 LTLIBINTL = @LTLIBINTL@
102 LTLIBOBJS = @LTLIBOBJS@
103 MAINT = @MAINT@
104 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
105 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
106 MAKEINFO = @MAKEINFO@
107 MSGFMT = @MSGFMT@
108 MSGFMT_015 = @MSGFMT_015@
109 MSGMERGE = @MSGMERGE@
110 OBJEXT = @OBJEXT@
111 PACKAGE = @PACKAGE@
112 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
113 PACKAGE_NAME = @PACKAGE_NAME@
114 PACKAGE_STRING = @PACKAGE_STRING@
115 PACKAGE_TARNAME = @PACKAGE_TARNAME@
116 PACKAGE_VERSION = @PACKAGE_VERSION@
117 PATH_SEPARATOR = @PATH_SEPARATOR@
118 PA_MODULES_PATH = @PA_MODULES_PATH@
119 PA_VERSION = @PA_VERSION@
120 PE_CFLAGS = @PE_CFLAGS@
121 PE_MODULES_PATH = @PE_MODULES_PATH@
122 PH_CONFIG_PATH = @PH_CONFIG_PATH@
123 PH_MODULES_PATH = @PH_MODULES_PATH@
124 PKG_CONFIG = @PKG_CONFIG@
125 POSUB = @POSUB@
126 PY_CFLAGS = @PY_CFLAGS@
127 PY_MODULES_PATH = @PY_MODULES_PATH@
128 PY_VERSION = @PY_VERSION@
129 RANLIB = @RANLIB@
130 RU_CFLAGS = @RU_CFLAGS@
131 RU_MODULES_PATH = @RU_MODULES_PATH@
132 RU_VERSION = @RU_VERSION@
133 SED = @SED@
134 SET_MAKE = @SET_MAKE@
135 SHELL = @SHELL@
136 STRIP = @STRIP@
137 USE_NLS = @USE_NLS@
138 VERSION = @VERSION@
139 VERSION_INFO = @VERSION_INFO@
140 WITH_HCAL_FALSE = @WITH_HCAL_FALSE@
141 WITH_HCAL_TRUE = @WITH_HCAL_TRUE@
142 WITH_PASCAL_FALSE = @WITH_PASCAL_FALSE@
143 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
144 WITH_PERL_FALSE = @WITH_PERL_FALSE@
145 WITH_PERL_TRUE = @WITH_PERL_TRUE@
146 WITH_PHP_FALSE = @WITH_PHP_FALSE@
147 WITH_PHP_TRUE = @WITH_PHP_TRUE@
148 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
149 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
150 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
151 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
152 XGETTEXT = @XGETTEXT@
153 XGETTEXT_015 = @XGETTEXT_015@
154 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
155 ac_ct_CC = @ac_ct_CC@
156 ac_ct_CXX = @ac_ct_CXX@
157 ac_ct_F77 = @ac_ct_F77@
158 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
159 am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
160 am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
161 am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
162 am__include = @am__include@
163 am__leading_dot = @am__leading_dot@
164 am__quote = @am__quote@
165 am__tar = @am__tar@
166 am__untar = @am__untar@
167 bindir = @bindir@
168 build = @build@
169 build_alias = @build_alias@
170 build_cpu = @build_cpu@
171 build_os = @build_os@
172 build_vendor = @build_vendor@
173 datadir = @datadir@
174 datarootdir = @datarootdir@
175 docdir = @docdir@
176 dvidir = @dvidir@
177 exec_prefix = @exec_prefix@
178 have_pascal = @have_pascal@
179 have_perl = @have_perl@
180 have_php = @have_php@
181 have_php_config = @have_php_config@
182 have_python = @have_python@
183 have_ruby = @have_ruby@
184 have_swig = @have_swig@
185 host = @host@
186 host_alias = @host_alias@
187 host_cpu = @host_cpu@
188 host_os = @host_os@
189 host_vendor = @host_vendor@
190 htmldir = @htmldir@
191 includedir = @includedir@
192 infodir = @infodir@
193 install_sh = @install_sh@
194 libdir = @libdir@
195 libexecdir = @libexecdir@
196 localedir = @localedir@
197 localstatedir = @localstatedir@
198 mandir = @mandir@
199 mkdir_p = @mkdir_p@
200 oldincludedir = @oldincludedir@
201 pdfdir = @pdfdir@
202 prefix = @prefix@
203 program_transform_name = @program_transform_name@
204 psdir = @psdir@
205 sbindir = @sbindir@
206 sharedstatedir = @sharedstatedir@
207 sysconfdir = @sysconfdir@
208 target_alias = @target_alias@
209 EXTRA_DIST = hdate.i
210 @WITH_RUBY_TRUE@DEPS = $(top_builddir)/src/libhdate.la
211 @WITH_RUBY_TRUE@CLEANFILES = *.o *.cxx *.so *wrap*
212 all: all-am
213
214 .SUFFIXES:
215 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
216 @for dep in $?; do \
217 case '$(am__configure_deps)' in \
218 *$$dep*) \
219 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
220 && exit 0; \
221 exit 1;; \
222 esac; \
223 done; \
224 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/ruby/Makefile'; \
225 cd $(top_srcdir) && \
226 $(AUTOMAKE) --gnu bindings/ruby/Makefile
227 .PRECIOUS: Makefile
228 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
229 @case '$?' in \
230 *config.status*) \
231 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
232 *) \
233 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
234 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
235 esac;
236
237 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
238 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
239
240 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
241 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
242 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
243 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
244
245 mostlyclean-libtool:
246 -rm -f *.lo
247
248 clean-libtool:
249 -rm -rf .libs _libs
250
251 distclean-libtool:
252 -rm -f libtool
253 uninstall-info-am:
254 tags: TAGS
255 TAGS:
256
257 ctags: CTAGS
258 CTAGS:
259
260
261 distdir: $(DISTFILES)
262 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
263 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
264 list='$(DISTFILES)'; for file in $$list; do \
265 case $$file in \
266 $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
267 $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
268 esac; \
269 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
270 dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
271 if test "$$dir" != "$$file" && test "$$dir" != "."; then \
272 dir="/$$dir"; \
273 $(mkdir_p) "$(distdir)$$dir"; \
274 else \
275 dir=''; \
276 fi; \
277 if test -d $$d/$$file; then \
278 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
279 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
280 fi; \
281 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
282 else \
283 test -f $(distdir)/$$file \
284 || cp -p $$d/$$file $(distdir)/$$file \
285 || exit 1; \
286 fi; \
287 done
288 check-am: all-am
289 check: check-am
290 all-am: Makefile
291 installdirs:
292 install: install-am
293 install-exec: install-exec-am
294 install-data: install-data-am
295 uninstall: uninstall-am
296
297 install-am: all-am
298 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
299
300 installcheck: installcheck-am
301 install-strip:
302 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
303 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
304 `test -z '$(STRIP)' || \
305 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
306 mostlyclean-generic:
307
308 clean-generic:
309 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
310
311 distclean-generic:
312 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
313
314 maintainer-clean-generic:
315 @echo "This command is intended for maintainers to use"
316 @echo "it deletes files that may require special tools to rebuild."
317 @WITH_RUBY_FALSE@install-data-local:
318 clean: clean-am
319
320 clean-am: clean-generic clean-libtool mostlyclean-am
321
322 distclean: distclean-am
323 -rm -f Makefile
324 distclean-am: clean-am distclean-generic distclean-libtool
325
326 dvi: dvi-am
327
328 dvi-am:
329
330 html: html-am
331
332 info: info-am
333
334 info-am:
335
336 install-data-am: install-data-local
337
338 install-exec-am:
339
340 install-info: install-info-am
341
342 install-man:
343
344 installcheck-am:
345
346 maintainer-clean: maintainer-clean-am
347 -rm -f Makefile
348 maintainer-clean-am: distclean-am maintainer-clean-generic
349
350 mostlyclean: mostlyclean-am
351
352 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
353
354 pdf: pdf-am
355
356 pdf-am:
357
358 ps: ps-am
359
360 ps-am:
361
362 uninstall-am: uninstall-info-am
363
364 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
365 distclean distclean-generic distclean-libtool distdir dvi \
366 dvi-am html html-am info info-am install install-am \
367 install-data install-data-am install-data-local install-exec \
368 install-exec-am install-info install-info-am install-man \
369 install-strip installcheck installcheck-am installdirs \
370 maintainer-clean maintainer-clean-generic mostlyclean \
371 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
372 uninstall uninstall-am uninstall-info-am
373
374
375 @WITH_RUBY_TRUE@all-am: hdate.so
376
377 @WITH_RUBY_TRUE@hdate.so: hdate_wrap.cxx
378 @WITH_RUBY_TRUE@ g++ -fpic -fno-strict-aliasing -g -O2 -c hdate_wrap.cxx $(RU_CFLAGS) -I$(top_srcdir)/src
379 @WITH_RUBY_TRUE@ gcc -shared ../../src/.libs/libhdate.so hdate_wrap.o -rdynamic -Wl,-export-dynamic -lruby$(RU_VERSION) -lpthread -ldl -lcrypt -lm -lc -lstdc++ -o hdate.so
380
381 @WITH_RUBY_TRUE@hdate_wrap.cxx: hdate.i
382 @WITH_RUBY_TRUE@ swig -c++ -ruby hdate.i
383
384 @WITH_RUBY_TRUE@install-data-local: hdate.so
385 @WITH_RUBY_TRUE@ $(mkinstalldirs) $(DESTDIR)$(RU_MODULES_PATH)
386 @WITH_RUBY_TRUE@ $(INSTALL_DATA) hdate.so $(DESTDIR)$(RU_MODULES_PATH)/hdate.so
387 # Tell versions [3.59,3.63) of GNU make to not export all variables.
388 # Otherwise a system limit (for SysV at least) may be exceeded.
389 .NOEXPORT:
0 // file : hdate.i
1 %module hdate
2 %{
3 #include "../../src/hdatepp.h"
4 %}
5
6 %include ../../src/hdatepp.h
7
8
885885 PY_MODULES_PATH
886886 WITH_PYTHON_TRUE
887887 WITH_PYTHON_FALSE
888 have_ruby
889 RU_VERSION
890 RU_CFLAGS
891 RU_MODULES_PATH
892 WITH_RUBY_TRUE
893 WITH_RUBY_FALSE
894 have_php
895 have_php_config
896 PH_CONFIG_PATH
897 PH_MODULES_PATH
898 WITH_PHP_TRUE
899 WITH_PHP_FALSE
888900 have_perl
889901 PE_CFLAGS
890902 PE_MODULES_PATH
15161528 --disable-libtool-lock avoid locking (might break parallel builds)
15171529 --disable-pascal do not build pascal binding
15181530 --disable-python do not build python binding
1531 --disable-ruby do not build ruby binding
1532 --disable-php do not build php binding
15191533 --disable-perl do not build perl binding
15201534 --disable-nls do not use Native Language Support
15211535 --disable-rpath do not hardcode runtime library paths
15301544 --with-tags[=TAGS] include additional configurations [automatic]
15311545 --with-python-sitelib-dir=PATH
15321546 path to python site lib
1547 --with-ruby-sitelib-dir=PATH
1548 path to ruby site lib
1549 --with-php-sitelib-dir=PATH
1550 path to php site lib
15331551 --with-perl-sitelib-dir=PATH
15341552 path to perl site lib
15351553 --with-gnu-ld assume the C compiler uses GNU ld default=no
19801998 PACKAGE=libhdate
19811999 LIBHDATE_MAJOR_VERSION=1
19822000 LIBHDATE_MINOR_VERSION=4
1983 LIBHDATE_MICRO_VERSION=10
2001 LIBHDATE_MICRO_VERSION=11
19842002
19852003 VERSION=$LIBHDATE_MAJOR_VERSION.$LIBHDATE_MINOR_VERSION.$LIBHDATE_MICRO_VERSION
19862004
62636281 ;;
62646282 *-*-irix6*)
62656283 # Find out which ABI we are using.
6266 echo '#line 6267 "configure"' > conftest.$ac_ext
6284 echo '#line 6285 "configure"' > conftest.$ac_ext
62676285 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
62686286 (eval $ac_compile) 2>&5
62696287 ac_status=$?
85278545 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
85288546 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
85298547 -e 's:$: $lt_compiler_flag:'`
8530 (eval echo "\"\$as_me:8531: $lt_compile\"" >&5)
8548 (eval echo "\"\$as_me:8549: $lt_compile\"" >&5)
85318549 (eval "$lt_compile" 2>conftest.err)
85328550 ac_status=$?
85338551 cat conftest.err >&5
8534 echo "$as_me:8535: \$? = $ac_status" >&5
8552 echo "$as_me:8553: \$? = $ac_status" >&5
85358553 if (exit $ac_status) && test -s "$ac_outfile"; then
85368554 # The compiler can only warn and ignore the option if not recognized
85378555 # So say no if there are warnings other than the usual output.
88178835 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
88188836 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
88198837 -e 's:$: $lt_compiler_flag:'`
8820 (eval echo "\"\$as_me:8821: $lt_compile\"" >&5)
8838 (eval echo "\"\$as_me:8839: $lt_compile\"" >&5)
88218839 (eval "$lt_compile" 2>conftest.err)
88228840 ac_status=$?
88238841 cat conftest.err >&5
8824 echo "$as_me:8825: \$? = $ac_status" >&5
8842 echo "$as_me:8843: \$? = $ac_status" >&5
88258843 if (exit $ac_status) && test -s "$ac_outfile"; then
88268844 # The compiler can only warn and ignore the option if not recognized
88278845 # So say no if there are warnings other than the usual output.
89218939 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
89228940 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
89238941 -e 's:$: $lt_compiler_flag:'`
8924 (eval echo "\"\$as_me:8925: $lt_compile\"" >&5)
8942 (eval echo "\"\$as_me:8943: $lt_compile\"" >&5)
89258943 (eval "$lt_compile" 2>out/conftest.err)
89268944 ac_status=$?
89278945 cat out/conftest.err >&5
8928 echo "$as_me:8929: \$? = $ac_status" >&5
8946 echo "$as_me:8947: \$? = $ac_status" >&5
89298947 if (exit $ac_status) && test -s out/conftest2.$ac_objext
89308948 then
89318949 # The compiler can only warn and ignore the option if not recognized
1128311301 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1128411302 lt_status=$lt_dlunknown
1128511303 cat > conftest.$ac_ext <<EOF
11286 #line 11287 "configure"
11304 #line 11305 "configure"
1128711305 #include "confdefs.h"
1128811306
1128911307 #if HAVE_DLFCN_H
1138311401 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1138411402 lt_status=$lt_dlunknown
1138511403 cat > conftest.$ac_ext <<EOF
11386 #line 11387 "configure"
11404 #line 11405 "configure"
1138711405 #include "confdefs.h"
1138811406
1138911407 #if HAVE_DLFCN_H
1380313821 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1380413822 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1380513823 -e 's:$: $lt_compiler_flag:'`
13806 (eval echo "\"\$as_me:13807: $lt_compile\"" >&5)
13824 (eval echo "\"\$as_me:13825: $lt_compile\"" >&5)
1380713825 (eval "$lt_compile" 2>conftest.err)
1380813826 ac_status=$?
1380913827 cat conftest.err >&5
13810 echo "$as_me:13811: \$? = $ac_status" >&5
13828 echo "$as_me:13829: \$? = $ac_status" >&5
1381113829 if (exit $ac_status) && test -s "$ac_outfile"; then
1381213830 # The compiler can only warn and ignore the option if not recognized
1381313831 # So say no if there are warnings other than the usual output.
1390713925 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1390813926 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1390913927 -e 's:$: $lt_compiler_flag:'`
13910 (eval echo "\"\$as_me:13911: $lt_compile\"" >&5)
13928 (eval echo "\"\$as_me:13929: $lt_compile\"" >&5)
1391113929 (eval "$lt_compile" 2>out/conftest.err)
1391213930 ac_status=$?
1391313931 cat out/conftest.err >&5
13914 echo "$as_me:13915: \$? = $ac_status" >&5
13932 echo "$as_me:13933: \$? = $ac_status" >&5
1391513933 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1391613934 then
1391713935 # The compiler can only warn and ignore the option if not recognized
1548415502 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1548515503 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1548615504 -e 's:$: $lt_compiler_flag:'`
15487 (eval echo "\"\$as_me:15488: $lt_compile\"" >&5)
15505 (eval echo "\"\$as_me:15506: $lt_compile\"" >&5)
1548815506 (eval "$lt_compile" 2>conftest.err)
1548915507 ac_status=$?
1549015508 cat conftest.err >&5
15491 echo "$as_me:15492: \$? = $ac_status" >&5
15509 echo "$as_me:15510: \$? = $ac_status" >&5
1549215510 if (exit $ac_status) && test -s "$ac_outfile"; then
1549315511 # The compiler can only warn and ignore the option if not recognized
1549415512 # So say no if there are warnings other than the usual output.
1558815606 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1558915607 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1559015608 -e 's:$: $lt_compiler_flag:'`
15591 (eval echo "\"\$as_me:15592: $lt_compile\"" >&5)
15609 (eval echo "\"\$as_me:15610: $lt_compile\"" >&5)
1559215610 (eval "$lt_compile" 2>out/conftest.err)
1559315611 ac_status=$?
1559415612 cat out/conftest.err >&5
15595 echo "$as_me:15596: \$? = $ac_status" >&5
15613 echo "$as_me:15614: \$? = $ac_status" >&5
1559615614 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1559715615 then
1559815616 # The compiler can only warn and ignore the option if not recognized
1778817806 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1778917807 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1779017808 -e 's:$: $lt_compiler_flag:'`
17791 (eval echo "\"\$as_me:17792: $lt_compile\"" >&5)
17809 (eval echo "\"\$as_me:17810: $lt_compile\"" >&5)
1779217810 (eval "$lt_compile" 2>conftest.err)
1779317811 ac_status=$?
1779417812 cat conftest.err >&5
17795 echo "$as_me:17796: \$? = $ac_status" >&5
17813 echo "$as_me:17814: \$? = $ac_status" >&5
1779617814 if (exit $ac_status) && test -s "$ac_outfile"; then
1779717815 # The compiler can only warn and ignore the option if not recognized
1779817816 # So say no if there are warnings other than the usual output.
1807818096 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1807918097 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1808018098 -e 's:$: $lt_compiler_flag:'`
18081 (eval echo "\"\$as_me:18082: $lt_compile\"" >&5)
18099 (eval echo "\"\$as_me:18100: $lt_compile\"" >&5)
1808218100 (eval "$lt_compile" 2>conftest.err)
1808318101 ac_status=$?
1808418102 cat conftest.err >&5
18085 echo "$as_me:18086: \$? = $ac_status" >&5
18103 echo "$as_me:18104: \$? = $ac_status" >&5
1808618104 if (exit $ac_status) && test -s "$ac_outfile"; then
1808718105 # The compiler can only warn and ignore the option if not recognized
1808818106 # So say no if there are warnings other than the usual output.
1818218200 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1818318201 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1818418202 -e 's:$: $lt_compiler_flag:'`
18185 (eval echo "\"\$as_me:18186: $lt_compile\"" >&5)
18203 (eval echo "\"\$as_me:18204: $lt_compile\"" >&5)
1818618204 (eval "$lt_compile" 2>out/conftest.err)
1818718205 ac_status=$?
1818818206 cat out/conftest.err >&5
18189 echo "$as_me:18190: \$? = $ac_status" >&5
18207 echo "$as_me:18208: \$? = $ac_status" >&5
1819018208 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1819118209 then
1819218210 # The compiler can only warn and ignore the option if not recognized
2122921247 else
2123021248 WITH_PYTHON_TRUE='#'
2123121249 WITH_PYTHON_FALSE=
21250 fi
21251
21252
21253
21254 # Extract the first word of ""ruby"", so it can be a program name with args.
21255 set dummy "ruby"; ac_word=$2
21256 { echo "$as_me:$LINENO: checking for $ac_word" >&5
21257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
21258 if test "${ac_cv_prog_have_ruby+set}" = set; then
21259 echo $ECHO_N "(cached) $ECHO_C" >&6
21260 else
21261 if test -n "$have_ruby"; then
21262 ac_cv_prog_have_ruby="$have_ruby" # Let the user override the test.
21263 else
21264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21265 for as_dir in $PATH
21266 do
21267 IFS=$as_save_IFS
21268 test -z "$as_dir" && as_dir=.
21269 for ac_exec_ext in '' $ac_executable_extensions; do
21270 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21271 ac_cv_prog_have_ruby="yes"
21272 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21273 break 2
21274 fi
21275 done
21276 done
21277 IFS=$as_save_IFS
21278
21279 test -z "$ac_cv_prog_have_ruby" && ac_cv_prog_have_ruby="no"
21280 fi
21281 fi
21282 have_ruby=$ac_cv_prog_have_ruby
21283 if test -n "$have_ruby"; then
21284 { echo "$as_me:$LINENO: result: $have_ruby" >&5
21285 echo "${ECHO_T}$have_ruby" >&6; }
21286 else
21287 { echo "$as_me:$LINENO: result: no" >&5
21288 echo "${ECHO_T}no" >&6; }
21289 fi
21290
21291
21292
21293 build_ruby=$have_ruby
21294
21295 # Check whether --enable-ruby was given.
21296 if test "${enable_ruby+set}" = set; then
21297 enableval=$enable_ruby; build_ruby=no
21298 else
21299 build_ruby=$have_ruby
21300 fi
21301
21302
21303
21304 # Check whether --with-ruby-sitelib-dir was given.
21305 if test "${with_ruby_sitelib_dir+set}" = set; then
21306 withval=$with_ruby_sitelib_dir;
21307 fi
21308
21309
21310 if test "$have_ruby" = "yes"; then
21311 RU_PREFIX=`ruby -e 'require "mkmf"; puts $topdir'`
21312 RU_VERSION=`ruby -e "require 'mkmf'; puts config_string('MAJOR')"`
21313 RU_VERSION+=.`ruby -e "require 'mkmf'; puts config_string('MINOR')"`
21314 { echo "$as_me:$LINENO: checking for $RU_PREFIX/ruby.h" >&5
21315 echo $ECHO_N "checking for $RU_PREFIX/ruby.h... $ECHO_C" >&6; }
21316 if test -f $RU_PREFIX/ruby.h; then
21317 { echo "$as_me:$LINENO: result: yes" >&5
21318 echo "${ECHO_T}yes" >&6; }
21319 RU_CFLAGS="-I$RU_PREFIX"
21320
21321 if test "$with_ruby_sitelib_dir" = "" ; then
21322 RU_MODULES_PATH="$RU_PREFIX"
21323 else
21324 RU_MODULES_PATH=$with_ruby_sitelib_dir
21325 fi
21326
21327
21328
21329
21330 if test "$have_swig" = "no"; then
21331 build_ruby=no
21332 fi
21333 else
21334 { echo "$as_me:$LINENO: result: no" >&5
21335 echo "${ECHO_T}no" >&6; }
21336 build_ruby=no
21337 fi
21338 fi
21339
21340
21341
21342 if test "$build_ruby" = "yes"; then
21343 WITH_RUBY_TRUE=
21344 WITH_RUBY_FALSE='#'
21345 else
21346 WITH_RUBY_TRUE='#'
21347 WITH_RUBY_FALSE=
21348 fi
21349
21350
21351
21352 # Extract the first word of ""php"", so it can be a program name with args.
21353 set dummy "php"; ac_word=$2
21354 { echo "$as_me:$LINENO: checking for $ac_word" >&5
21355 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
21356 if test "${ac_cv_prog_have_php+set}" = set; then
21357 echo $ECHO_N "(cached) $ECHO_C" >&6
21358 else
21359 if test -n "$have_php"; then
21360 ac_cv_prog_have_php="$have_php" # Let the user override the test.
21361 else
21362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21363 for as_dir in $PATH
21364 do
21365 IFS=$as_save_IFS
21366 test -z "$as_dir" && as_dir=.
21367 for ac_exec_ext in '' $ac_executable_extensions; do
21368 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21369 ac_cv_prog_have_php="yes"
21370 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21371 break 2
21372 fi
21373 done
21374 done
21375 IFS=$as_save_IFS
21376
21377 test -z "$ac_cv_prog_have_php" && ac_cv_prog_have_php="no"
21378 fi
21379 fi
21380 have_php=$ac_cv_prog_have_php
21381 if test -n "$have_php"; then
21382 { echo "$as_me:$LINENO: result: $have_php" >&5
21383 echo "${ECHO_T}$have_php" >&6; }
21384 else
21385 { echo "$as_me:$LINENO: result: no" >&5
21386 echo "${ECHO_T}no" >&6; }
21387 fi
21388
21389
21390
21391 build_php=$have_php
21392
21393 # Check whether --enable-php was given.
21394 if test "${enable_php+set}" = set; then
21395 enableval=$enable_php; build_php=no
21396 else
21397 build_php=$have_php
21398 fi
21399
21400
21401
21402 # Check whether --with-php-sitelib-dir was given.
21403 if test "${with_php_sitelib_dir+set}" = set; then
21404 withval=$with_php_sitelib_dir;
21405 fi
21406
21407
21408 if test "$have_php" = "yes"; then
21409 # Extract the first word of ""php-config5"", so it can be a program name with args.
21410 set dummy "php-config5"; ac_word=$2
21411 { echo "$as_me:$LINENO: checking for $ac_word" >&5
21412 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
21413 if test "${ac_cv_prog_have_php_config+set}" = set; then
21414 echo $ECHO_N "(cached) $ECHO_C" >&6
21415 else
21416 if test -n "$have_php_config"; then
21417 ac_cv_prog_have_php_config="$have_php_config" # Let the user override the test.
21418 else
21419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21420 for as_dir in $PATH
21421 do
21422 IFS=$as_save_IFS
21423 test -z "$as_dir" && as_dir=.
21424 for ac_exec_ext in '' $ac_executable_extensions; do
21425 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21426 ac_cv_prog_have_php_config="yes"
21427 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21428 break 2
21429 fi
21430 done
21431 done
21432 IFS=$as_save_IFS
21433
21434 test -z "$ac_cv_prog_have_php_config" && ac_cv_prog_have_php_config="no"
21435 fi
21436 fi
21437 have_php_config=$ac_cv_prog_have_php_config
21438 if test -n "$have_php_config"; then
21439 { echo "$as_me:$LINENO: result: $have_php_config" >&5
21440 echo "${ECHO_T}$have_php_config" >&6; }
21441 else
21442 { echo "$as_me:$LINENO: result: no" >&5
21443 echo "${ECHO_T}no" >&6; }
21444 fi
21445
21446
21447 if test "$have_php_config" = "yes"; then
21448
21449 PH_CONFIG_PATH=`php --ini | head -n1 | cut -d: -f2 | sed 's/\s//g'`
21450 if test "$with_php_sitelib_dir" = "" ; then
21451 PH_MODULES_PATH=`php-config5 --extension-dir`
21452 else
21453 PH_MODULES_PATH=$with_php_sitelib_dir
21454 fi
21455
21456
21457
21458 if test "$have_swig" = "no"; then
21459 build_php=no
21460 fi
21461 else
21462 { echo "$as_me:$LINENO: result: no" >&5
21463 echo "${ECHO_T}no" >&6; }
21464 build_php=no
21465 fi
21466 fi
21467
21468
21469
21470 if test "$build_php" = "yes"; then
21471 WITH_PHP_TRUE=
21472 WITH_PHP_FALSE='#'
21473 else
21474 WITH_PHP_TRUE='#'
21475 WITH_PHP_FALSE=
2123221476 fi
2123321477
2123421478
2350323747
2350423748
2350523749
23506 ac_config_files="$ac_config_files Makefile libhdate.pc po/Makefile.in docs/Makefile docs/man/Makefile docs/man/man1/Makefile docs/man/man3/Makefile src/Makefile examples/Makefile examples/hcal/Makefile examples/bindings/Makefile bindings/Makefile bindings/python/Makefile bindings/perl/Makefile bindings/pascal/Makefile"
23750 ac_config_files="$ac_config_files Makefile libhdate.pc po/Makefile.in docs/Makefile docs/man/Makefile docs/man/man1/Makefile docs/man/man3/Makefile src/Makefile examples/Makefile examples/hcal/Makefile examples/bindings/Makefile examples/bindings/pascal/Makefile bindings/Makefile bindings/python/Makefile bindings/perl/Makefile bindings/pascal/Makefile bindings/ruby/Makefile bindings/php/Makefile"
2350723751
2350823752 cat >confcache <<\_ACEOF
2350923753 # This file is a shell script that caches the results of configure
2368723931 Usually this means the macro was only invoked conditionally." >&2;}
2368823932 { (exit 1); exit 1; }; }
2368923933 fi
23934 if test -z "${WITH_RUBY_TRUE}" && test -z "${WITH_RUBY_FALSE}"; then
23935 { { echo "$as_me:$LINENO: error: conditional \"WITH_RUBY\" was never defined.
23936 Usually this means the macro was only invoked conditionally." >&5
23937 echo "$as_me: error: conditional \"WITH_RUBY\" was never defined.
23938 Usually this means the macro was only invoked conditionally." >&2;}
23939 { (exit 1); exit 1; }; }
23940 fi
23941 if test -z "${WITH_PHP_TRUE}" && test -z "${WITH_PHP_FALSE}"; then
23942 { { echo "$as_me:$LINENO: error: conditional \"WITH_PHP\" was never defined.
23943 Usually this means the macro was only invoked conditionally." >&5
23944 echo "$as_me: error: conditional \"WITH_PHP\" was never defined.
23945 Usually this means the macro was only invoked conditionally." >&2;}
23946 { (exit 1); exit 1; }; }
23947 fi
2369023948 if test -z "${WITH_PERL_TRUE}" && test -z "${WITH_PERL_FALSE}"; then
2369123949 { { echo "$as_me:$LINENO: error: conditional \"WITH_PERL\" was never defined.
2369223950 Usually this means the macro was only invoked conditionally." >&5
2417224430 "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
2417324431 "examples/hcal/Makefile") CONFIG_FILES="$CONFIG_FILES examples/hcal/Makefile" ;;
2417424432 "examples/bindings/Makefile") CONFIG_FILES="$CONFIG_FILES examples/bindings/Makefile" ;;
24433 "examples/bindings/pascal/Makefile") CONFIG_FILES="$CONFIG_FILES examples/bindings/pascal/Makefile" ;;
2417524434 "bindings/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/Makefile" ;;
2417624435 "bindings/python/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/python/Makefile" ;;
2417724436 "bindings/perl/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/perl/Makefile" ;;
2417824437 "bindings/pascal/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/pascal/Makefile" ;;
24438 "bindings/ruby/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/ruby/Makefile" ;;
24439 "bindings/php/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/php/Makefile" ;;
2417924440
2418024441 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
2418124442 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
2439624657 PY_MODULES_PATH!$PY_MODULES_PATH$ac_delim
2439724658 WITH_PYTHON_TRUE!$WITH_PYTHON_TRUE$ac_delim
2439824659 WITH_PYTHON_FALSE!$WITH_PYTHON_FALSE$ac_delim
24660 have_ruby!$have_ruby$ac_delim
24661 RU_VERSION!$RU_VERSION$ac_delim
24662 RU_CFLAGS!$RU_CFLAGS$ac_delim
24663 RU_MODULES_PATH!$RU_MODULES_PATH$ac_delim
24664 WITH_RUBY_TRUE!$WITH_RUBY_TRUE$ac_delim
24665 WITH_RUBY_FALSE!$WITH_RUBY_FALSE$ac_delim
24666 have_php!$have_php$ac_delim
24667 have_php_config!$have_php_config$ac_delim
24668 PH_CONFIG_PATH!$PH_CONFIG_PATH$ac_delim
24669 PH_MODULES_PATH!$PH_MODULES_PATH$ac_delim
24670 WITH_PHP_TRUE!$WITH_PHP_TRUE$ac_delim
24671 WITH_PHP_FALSE!$WITH_PHP_FALSE$ac_delim
2439924672 have_perl!$have_perl$ac_delim
2440024673 PE_CFLAGS!$PE_CFLAGS$ac_delim
2440124674 PE_MODULES_PATH!$PE_MODULES_PATH$ac_delim
2442524698 LTLIBOBJS!$LTLIBOBJS$ac_delim
2442624699 _ACEOF
2442724700
24428 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 48; then
24701 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 60; then
2442924702 break
2443024703 elif $ac_last_try; then
2443124704 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
2500125274
2500225275
2500325276
25277 echo $sysconfdir
25278
2500425279 echo "
2500525280 $PACKAGE-$VERSION
2500625281
2500825283 compiler: ${CC}
2500925284
2501025285 have swig ${have_swig}
25011 have free pascal ${have_pascal}
25286 have free pascal ${have_pascal}
2501225287 have python ${have_python}
2501325288 have perl ${have_perl}
25289 have ruby ${have_ruby}
25290 have php ${have_php} php-dev ${have_php_config}
2501425291
2501525292 build hcal ${build_hcal}
2501625293
2501725294 build python binding ${build_python}
2501825295 build perl binding ${build_perl}
2501925296 puild pascal binding ${build_pascal}
25297 puild ruby binding ${build_ruby}
25298 puild php binding ${build_php}
2502025299
2502125300 perl site lib path: $PE_MODULES_PATH
2502225301 python site lib path: $PY_MODULES_PATH
2502325302 pascal site lib path: $PA_MODULES_PATH
25303 ruby site lib path: $RU_MODULES_PATH
25304 php site lib path: $PH_MODULES_PATH
25305 php config path: $PH_CONFIG_PATH
2502425306 "
33 PACKAGE=libhdate
44 LIBHDATE_MAJOR_VERSION=1
55 LIBHDATE_MINOR_VERSION=4
6 LIBHDATE_MICRO_VERSION=10
6 LIBHDATE_MICRO_VERSION=11
77
88 VERSION=$LIBHDATE_MAJOR_VERSION.$LIBHDATE_MINOR_VERSION.$LIBHDATE_MICRO_VERSION
99
103103 fi
104104
105105 AM_CONDITIONAL(WITH_PYTHON, test "$build_python" = "yes")
106
107 dnl =======================================================================================
108
109 AC_CHECK_PROG(have_ruby, "ruby", yes, no)
110
111 build_ruby=$have_ruby
112
113 AC_ARG_ENABLE([ruby],
114 [AS_HELP_STRING([--disable-ruby],
115 [do not build ruby binding])],
116 [build_ruby=no], [build_ruby=$have_ruby])
117
118 AC_ARG_WITH(ruby-sitelib-dir,
119 [AS_HELP_STRING([--with-ruby-sitelib-dir=PATH],
120 [path to ruby site lib])])
121
122 if test "$have_ruby" = "yes"; then
123 RU_PREFIX=`ruby -e 'require "mkmf"; puts $topdir'`
124 RU_VERSION=`ruby -e "require 'mkmf'; puts config_string('MAJOR')"`
125 RU_VERSION+=.`ruby -e "require 'mkmf'; puts config_string('MINOR')"`
126 AC_MSG_CHECKING(for $RU_PREFIX/ruby.h)
127 if test -f $RU_PREFIX/ruby.h; then
128 AC_MSG_RESULT(yes)
129 RU_CFLAGS="-I$RU_PREFIX"
130
131 if test "$with_ruby_sitelib_dir" = "" ; then
132 RU_MODULES_PATH="$RU_PREFIX"
133 else
134 RU_MODULES_PATH=$with_ruby_sitelib_dir
135 fi
136
137 AC_SUBST([RU_VERSION])
138 AC_SUBST([RU_CFLAGS])
139 AC_SUBST([RU_MODULES_PATH])
140 if test "$have_swig" = "no"; then
141 build_ruby=no
142 fi
143 else
144 AC_MSG_RESULT(no)
145 build_ruby=no
146 fi
147 fi
148
149 AM_CONDITIONAL(WITH_RUBY, test "$build_ruby" = "yes")
150
151 dnl =======================================================================================
152
153 AC_CHECK_PROG(have_php, "php", yes, no)
154
155 build_php=$have_php
156
157 AC_ARG_ENABLE([php],
158 [AS_HELP_STRING([--disable-php],
159 [do not build php binding])],
160 [build_php=no], [build_php=$have_php])
161
162 AC_ARG_WITH(php-sitelib-dir,
163 [AS_HELP_STRING([--with-php-sitelib-dir=PATH],
164 [path to php site lib])])
165
166 if test "$have_php" = "yes"; then
167 AC_CHECK_PROG(have_php_config, "php-config5", yes, no)
168 if test "$have_php_config" = "yes"; then
169
170 PH_CONFIG_PATH=`php --ini | head -n1 | cut -d: -f2 | sed 's/\s//g'`
171 if test "$with_php_sitelib_dir" = "" ; then
172 PH_MODULES_PATH=`php-config5 --extension-dir`
173 else
174 PH_MODULES_PATH=$with_php_sitelib_dir
175 fi
176
177 AC_SUBST([PH_CONFIG_PATH])
178 AC_SUBST([PH_MODULES_PATH])
179 if test "$have_swig" = "no"; then
180 build_php=no
181 fi
182 else
183 AC_MSG_RESULT(no)
184 build_php=no
185 fi
186 fi
187
188 AM_CONDITIONAL(WITH_PHP, test "$build_php" = "yes")
106189
107190 dnl =======================================================================================
108191
196279 examples/Makefile
197280 examples/hcal/Makefile
198281 examples/bindings/Makefile
282 examples/bindings/pascal/Makefile
199283 bindings/Makefile
200284 bindings/python/Makefile
201285 bindings/perl/Makefile
202286 bindings/pascal/Makefile
287 bindings/ruby/Makefile
288 bindings/php/Makefile
203289 ])
204290
205291 dnl ===========================================================================================
292
293 echo $sysconfdir
206294
207295 echo "
208296 $PACKAGE-$VERSION
211299 compiler: ${CC}
212300
213301 have swig ${have_swig}
214 have free pascal ${have_pascal}
302 have free pascal ${have_pascal}
215303 have python ${have_python}
216304 have perl ${have_perl}
305 have ruby ${have_ruby}
306 have php ${have_php} php-dev ${have_php_config}
217307
218308 build hcal ${build_hcal}
219309
220310 build python binding ${build_python}
221311 build perl binding ${build_perl}
222312 puild pascal binding ${build_pascal}
313 puild ruby binding ${build_ruby}
314 puild php binding ${build_php}
223315
224316 perl site lib path: $PE_MODULES_PATH
225317 python site lib path: $PY_MODULES_PATH
226318 pascal site lib path: $PA_MODULES_PATH
319 ruby site lib path: $RU_MODULES_PATH
320 php site lib path: $PH_MODULES_PATH
321 php config path: $PH_CONFIG_PATH
227322 "
128128 PA_VERSION = @PA_VERSION@
129129 PE_CFLAGS = @PE_CFLAGS@
130130 PE_MODULES_PATH = @PE_MODULES_PATH@
131 PH_CONFIG_PATH = @PH_CONFIG_PATH@
132 PH_MODULES_PATH = @PH_MODULES_PATH@
131133 PKG_CONFIG = @PKG_CONFIG@
132134 POSUB = @POSUB@
133135 PY_CFLAGS = @PY_CFLAGS@
134136 PY_MODULES_PATH = @PY_MODULES_PATH@
135137 PY_VERSION = @PY_VERSION@
136138 RANLIB = @RANLIB@
139 RU_CFLAGS = @RU_CFLAGS@
140 RU_MODULES_PATH = @RU_MODULES_PATH@
141 RU_VERSION = @RU_VERSION@
137142 SED = @SED@
138143 SET_MAKE = @SET_MAKE@
139144 SHELL = @SHELL@
147152 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
148153 WITH_PERL_FALSE = @WITH_PERL_FALSE@
149154 WITH_PERL_TRUE = @WITH_PERL_TRUE@
155 WITH_PHP_FALSE = @WITH_PHP_FALSE@
156 WITH_PHP_TRUE = @WITH_PHP_TRUE@
150157 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
151158 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
159 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
160 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
152161 XGETTEXT = @XGETTEXT@
153162 XGETTEXT_015 = @XGETTEXT_015@
154163 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
177186 exec_prefix = @exec_prefix@
178187 have_pascal = @have_pascal@
179188 have_perl = @have_perl@
189 have_php = @have_php@
190 have_php_config = @have_php_config@
180191 have_python = @have_python@
192 have_ruby = @have_ruby@
181193 have_swig = @have_swig@
182194 host = @host@
183195 host_alias = @host_alias@
128128 PA_VERSION = @PA_VERSION@
129129 PE_CFLAGS = @PE_CFLAGS@
130130 PE_MODULES_PATH = @PE_MODULES_PATH@
131 PH_CONFIG_PATH = @PH_CONFIG_PATH@
132 PH_MODULES_PATH = @PH_MODULES_PATH@
131133 PKG_CONFIG = @PKG_CONFIG@
132134 POSUB = @POSUB@
133135 PY_CFLAGS = @PY_CFLAGS@
134136 PY_MODULES_PATH = @PY_MODULES_PATH@
135137 PY_VERSION = @PY_VERSION@
136138 RANLIB = @RANLIB@
139 RU_CFLAGS = @RU_CFLAGS@
140 RU_MODULES_PATH = @RU_MODULES_PATH@
141 RU_VERSION = @RU_VERSION@
137142 SED = @SED@
138143 SET_MAKE = @SET_MAKE@
139144 SHELL = @SHELL@
147152 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
148153 WITH_PERL_FALSE = @WITH_PERL_FALSE@
149154 WITH_PERL_TRUE = @WITH_PERL_TRUE@
155 WITH_PHP_FALSE = @WITH_PHP_FALSE@
156 WITH_PHP_TRUE = @WITH_PHP_TRUE@
150157 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
151158 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
159 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
160 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
152161 XGETTEXT = @XGETTEXT@
153162 XGETTEXT_015 = @XGETTEXT_015@
154163 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
177186 exec_prefix = @exec_prefix@
178187 have_pascal = @have_pascal@
179188 have_perl = @have_perl@
189 have_php = @have_php@
190 have_php_config = @have_php_config@
180191 have_python = @have_python@
192 have_ruby = @have_ruby@
181193 have_swig = @have_swig@
182194 host = @host@
183195 host_alias = @host_alias@
123123 PA_VERSION = @PA_VERSION@
124124 PE_CFLAGS = @PE_CFLAGS@
125125 PE_MODULES_PATH = @PE_MODULES_PATH@
126 PH_CONFIG_PATH = @PH_CONFIG_PATH@
127 PH_MODULES_PATH = @PH_MODULES_PATH@
126128 PKG_CONFIG = @PKG_CONFIG@
127129 POSUB = @POSUB@
128130 PY_CFLAGS = @PY_CFLAGS@
129131 PY_MODULES_PATH = @PY_MODULES_PATH@
130132 PY_VERSION = @PY_VERSION@
131133 RANLIB = @RANLIB@
134 RU_CFLAGS = @RU_CFLAGS@
135 RU_MODULES_PATH = @RU_MODULES_PATH@
136 RU_VERSION = @RU_VERSION@
132137 SED = @SED@
133138 SET_MAKE = @SET_MAKE@
134139 SHELL = @SHELL@
142147 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
143148 WITH_PERL_FALSE = @WITH_PERL_FALSE@
144149 WITH_PERL_TRUE = @WITH_PERL_TRUE@
150 WITH_PHP_FALSE = @WITH_PHP_FALSE@
151 WITH_PHP_TRUE = @WITH_PHP_TRUE@
145152 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
146153 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
154 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
155 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
147156 XGETTEXT = @XGETTEXT@
148157 XGETTEXT_015 = @XGETTEXT_015@
149158 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
172181 exec_prefix = @exec_prefix@
173182 have_pascal = @have_pascal@
174183 have_perl = @have_perl@
184 have_php = @have_php@
185 have_php_config = @have_php_config@
175186 have_python = @have_python@
187 have_ruby = @have_ruby@
176188 have_swig = @have_swig@
177189 host = @host@
178190 host_alias = @host_alias@
123123 PA_VERSION = @PA_VERSION@
124124 PE_CFLAGS = @PE_CFLAGS@
125125 PE_MODULES_PATH = @PE_MODULES_PATH@
126 PH_CONFIG_PATH = @PH_CONFIG_PATH@
127 PH_MODULES_PATH = @PH_MODULES_PATH@
126128 PKG_CONFIG = @PKG_CONFIG@
127129 POSUB = @POSUB@
128130 PY_CFLAGS = @PY_CFLAGS@
129131 PY_MODULES_PATH = @PY_MODULES_PATH@
130132 PY_VERSION = @PY_VERSION@
131133 RANLIB = @RANLIB@
134 RU_CFLAGS = @RU_CFLAGS@
135 RU_MODULES_PATH = @RU_MODULES_PATH@
136 RU_VERSION = @RU_VERSION@
132137 SED = @SED@
133138 SET_MAKE = @SET_MAKE@
134139 SHELL = @SHELL@
142147 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
143148 WITH_PERL_FALSE = @WITH_PERL_FALSE@
144149 WITH_PERL_TRUE = @WITH_PERL_TRUE@
150 WITH_PHP_FALSE = @WITH_PHP_FALSE@
151 WITH_PHP_TRUE = @WITH_PHP_TRUE@
145152 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
146153 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
154 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
155 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
147156 XGETTEXT = @XGETTEXT@
148157 XGETTEXT_015 = @XGETTEXT_015@
149158 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
172181 exec_prefix = @exec_prefix@
173182 have_pascal = @have_pascal@
174183 have_perl = @have_perl@
184 have_php = @have_php@
185 have_php_config = @have_php_config@
175186 have_python = @have_python@
187 have_ruby = @have_ruby@
176188 have_swig = @have_swig@
177189 host = @host@
178190 host_alias = @host_alias@
0 .TH "hdate" 3 "3 Jan 2008" "Version 1.4" "libhdate C++ language" \" -*- nroff -*-
0 .TH "hdate" 3 "6 Jan 2008" "Version 1.4" "libhdate C++ language" \" -*- nroff -*-
11 .ad l
22 .nh
33 .SH NAME
0 .TH "src/hdate.h" 3 "4 Jan 2008" "Version 1.4" "libhdate C language" \" -*- nroff -*-
0 .TH "src/hdate.h" 3 "26 Jan 2008" "Version 1.4" "libhdate C language" \" -*- nroff -*-
11 .ad l
22 .nh
33 .SH NAME
4 src/hdate.h \-
4 src/hdate.h \- libhdate C language header.
55 .SH SYNOPSIS
66 .br
77 .PP
1111 .ti -1c
1212 .RI "struct \fBhdate_struct\fP"
1313 .br
14 .RI "\fIlibhdate Hebrew date struct \fP"
1415 .in -1c
1516 .SS "Defines"
1617
1718 .in +1c
1819 .ti -1c
19 .RI "#define \fBHDATA_DIASPORA_FLAG\fP -1"
20 .RI "#define \fBHDATE_DIASPORA_FLAG\fP -1"
2021 .br
2122 .RI "\fIuse diaspora dates and holydays flag \fP"
2223 .ti -1c
23 .RI "#define \fBHDATA_ISRAEL_FLAG\fP 0"
24 .RI "#define \fBHDATE_ISRAEL_FLAG\fP 0"
2425 .br
2526 .RI "\fIuse israel dates and holydays flag \fP"
2627 .ti -1c
27 .RI "#define \fBHDATA_SHORT_FLAG\fP -1"
28 .RI "#define \fBHDATE_SHORT_FLAG\fP -1"
2829 .br
2930 .RI "\fIuse short strings flag \fP"
3031 .ti -1c
31 .RI "#define \fBHDATA_LONG_FLAG\fP 0"
32 .RI "#define \fBHDATE_LONG_FLAG\fP 0"
3233 .br
3334 .RI "\fIuse long strings flag \fP"
3435 .in -1c
196197 .br
197198 .RI "\fIname of translator \fP"
198199 .in -1c
200 .SH "Detailed Description"
201 .PP
202 libhdate C language header.
203
204 libhdate - Hebrew calendar library, the C language header file.
199205 .SH "Define Documentation"
200206 .PP
201 .SS "#define HDATA_DIASPORA_FLAG -1"
207 .SS "#define HDATE_DIASPORA_FLAG -1"
202208 .PP
203209 use diaspora dates and holydays flag
204210 .PP
205 .SS "#define HDATA_ISRAEL_FLAG 0"
211 .SS "#define HDATE_ISRAEL_FLAG 0"
206212 .PP
207213 use israel dates and holydays flag
208214 .PP
209 .SS "#define HDATA_SHORT_FLAG -1"
215 .SS "#define HDATE_SHORT_FLAG -1"
210216 .PP
211217 use short strings flag
212218 .PP
213 .SS "#define HDATA_LONG_FLAG 0"
219 .SS "#define HDATE_LONG_FLAG 0"
214220 .PP
215221 use long strings flag
216222 .PP
623629 .PP
624630 utc sun times for altitude at a gregorian date
625631 .PP
626 day this day of month month this month year this year longitude longitude to use in calculations latitude latitude to use in calculations deg degrees of sun's altitude (0 - Zenith .. 90 - Horizon) sunrise return the utc sunrise in minutes sunset return the utc sunset in minutes
632 Returns the sunset and sunrise times in minutes from 00:00 (utc time) if sun altitude in sunrise is deg degries. This function only works for altitudes sun realy is. If the sun never get to this altitude, the returned sunset and sunrise values will be negative. This can happen in low altitude when latitude is nearing the pols in winter times, the sun never goes very high in the sky there.
633 .PP
634 \fBParameters:\fP
635 .RS 4
636 \fIday\fP this day of month
637 .br
638 \fImonth\fP this month
639 .br
640 \fIyear\fP this year
641 .br
642 \fIlongitude\fP longitude to use in calculations
643 .br
644 \fIlatitude\fP latitude to use in calculations
645 .br
646 \fIdeg\fP degrees of sun's altitude (0 - Zenith .. 90 - Horizon)
647 .br
648 \fIsunrise\fP return the utc sunrise in minutes
649 .br
650 \fIsunset\fP return the utc sunset in minutes
651 .RE
652 .PP
653
627654 .SS "void hdate_get_utc_sun_time (int day, int month, int year, double latitude, double longitude, int * sunrise, int * sunset)"
628655 .PP
629656 utc sunrise/set time for a gregorian date
650677 .PP
651678 utc sunrise/set time for a gregorian date
652679 .PP
653 day this day of month month this month year this year longitude longitude to use in calculations latitude latitude to use in calculations sun_hour return the length of shaa zaminit in minutes first_light return the utc alut ha-shachar in minutes talit return the utc tphilin and talit in minutes sunrise return the utc sunrise in minutes midday return the utc midday in minutes sunset return the utc sunset in minutes first_stars return the utc tzeit hacochavim in minutes three_stars return the utc shlosha cochavim in minutes
680 \fBParameters:\fP
681 .RS 4
682 \fIday\fP this day of month
683 .br
684 \fImonth\fP this month
685 .br
686 \fIyear\fP this year
687 .br
688 \fIlongitude\fP longitude to use in calculations
689 .br
690 \fIlatitude\fP latitude to use in calculations
691 .br
692 \fIsun_hour\fP return the length of shaa zaminit in minutes
693 .br
694 \fIfirst_light\fP return the utc alut ha-shachar in minutes
695 .br
696 \fItalit\fP return the utc tphilin and talit in minutes
697 .br
698 \fIsunrise\fP return the utc sunrise in minutes
699 .br
700 \fImidday\fP return the utc midday in minutes
701 .br
702 \fIsunset\fP return the utc sunset in minutes
703 .br
704 \fIfirst_stars\fP return the utc tzeit hacochavim in minutes
705 .br
706 \fIthree_stars\fP return the utc shlosha cochavim in minutes
707 .RE
708 .PP
709
654710 .SS "int hdate_get_gday (\fBhdate_struct\fP const * h)"
655711 .PP
656712 get the Gregorian day of the month
0 .TH "hdate::Hdate" 3 "3 Jan 2008" "Version 1.4" "libhdate C++ language" \" -*- nroff -*-
0 .TH "hdate::Hdate" 3 "6 Jan 2008" "Version 1.4" "libhdate C++ language" \" -*- nroff -*-
11 .ad l
22 .nh
33 .SH NAME
0 .TH "hdate_struct" 3 "4 Jan 2008" "Version 1.4" "libhdate C language" \" -*- nroff -*-
0 .TH "hdate_struct" 3 "26 Jan 2008" "Version 1.4" "libhdate C language" \" -*- nroff -*-
11 .ad l
22 .nh
33 .SH NAME
4 hdate_struct \-
4 hdate_struct \- libhdate Hebrew date struct
5
6 .PP
57 .SH SYNOPSIS
68 .br
79 .PP
5254 .in -1c
5355 .SH "Detailed Description"
5456 .PP
55 Base structore for hebrew dates
57 libhdate Hebrew date struct
5658 .SH "Field Documentation"
5759 .PP
5860 .SS "int \fBhdate_struct::hd_day\fP"
0 .TH "src/hdatepp.h" 3 "3 Jan 2008" "Version 1.4" "libhdate C++ language" \" -*- nroff -*-
0 .TH "src/hdatepp.h" 3 "6 Jan 2008" "Version 1.4" "libhdate C++ language" \" -*- nroff -*-
11 .ad l
22 .nh
33 .SH NAME
4 src/hdatepp.h \-
4 src/hdatepp.h \- libhdate C++ language header.
55 .SH SYNOPSIS
66 .br
77 .PP
2323 .br
2424 .RI "\fI\fBHdate\fP class. \fP"
2525 .in -1c
26 .SH "Detailed Description"
27 .PP
28 libhdate C++ language header.
29
30 libhdate - Hebrew calendar library, the C++ language header file.
2631 .SH "Author"
2732 .PP
2833 Generated automatically by Doxygen for libhdate C++ language from the source code.
128128 PA_VERSION = @PA_VERSION@
129129 PE_CFLAGS = @PE_CFLAGS@
130130 PE_MODULES_PATH = @PE_MODULES_PATH@
131 PH_CONFIG_PATH = @PH_CONFIG_PATH@
132 PH_MODULES_PATH = @PH_MODULES_PATH@
131133 PKG_CONFIG = @PKG_CONFIG@
132134 POSUB = @POSUB@
133135 PY_CFLAGS = @PY_CFLAGS@
134136 PY_MODULES_PATH = @PY_MODULES_PATH@
135137 PY_VERSION = @PY_VERSION@
136138 RANLIB = @RANLIB@
139 RU_CFLAGS = @RU_CFLAGS@
140 RU_MODULES_PATH = @RU_MODULES_PATH@
141 RU_VERSION = @RU_VERSION@
137142 SED = @SED@
138143 SET_MAKE = @SET_MAKE@
139144 SHELL = @SHELL@
147152 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
148153 WITH_PERL_FALSE = @WITH_PERL_FALSE@
149154 WITH_PERL_TRUE = @WITH_PERL_TRUE@
155 WITH_PHP_FALSE = @WITH_PHP_FALSE@
156 WITH_PHP_TRUE = @WITH_PHP_TRUE@
150157 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
151158 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
159 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
160 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
152161 XGETTEXT = @XGETTEXT@
153162 XGETTEXT_015 = @XGETTEXT_015@
154163 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
177186 exec_prefix = @exec_prefix@
178187 have_pascal = @have_pascal@
179188 have_perl = @have_perl@
189 have_php = @have_php@
190 have_php_config = @have_php_config@
180191 have_python = @have_python@
192 have_ruby = @have_ruby@
181193 have_swig = @have_swig@
182194 host = @host@
183195 host_alias = @host_alias@
0 SUBDIRS = pascal
01
1 EXTRA_DIST = hdate_cpp.cpp hdate_python.py hdate_perl.pl hdate_pascal.pp
2 EXTRA_DIST = hdate_cpp.cpp hdate_python.py hdate_perl.pl hdate_ruby.rb hdate_php.php
23
34 libhdatedocdir = ${prefix}/share/doc/libhdate/examples/bindings
4 libhdatedoc_DATA = hdate_cpp.cpp hdate_python.py hdate_perl.pl hdate_pascal.pp
5 libhdatedoc_DATA = hdate_cpp.cpp hdate_python.py hdate_perl.pl hdate_ruby.rb hdate_php.php
5050 CONFIG_CLEAN_FILES =
5151 SOURCES =
5252 DIST_SOURCES =
53 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
54 html-recursive info-recursive install-data-recursive \
55 install-exec-recursive install-info-recursive \
56 install-recursive installcheck-recursive installdirs-recursive \
57 pdf-recursive ps-recursive uninstall-info-recursive \
58 uninstall-recursive
5359 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
5460 am__vpath_adj = case $$p in \
5561 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
5965 am__installdirs = "$(DESTDIR)$(libhdatedocdir)"
6066 libhdatedocDATA_INSTALL = $(INSTALL_DATA)
6167 DATA = $(libhdatedoc_DATA)
68 ETAGS = etags
69 CTAGS = ctags
70 DIST_SUBDIRS = $(SUBDIRS)
6271 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
6372 ACLOCAL = @ACLOCAL@
6473 AMDEP_FALSE = @AMDEP_FALSE@
129138 PA_VERSION = @PA_VERSION@
130139 PE_CFLAGS = @PE_CFLAGS@
131140 PE_MODULES_PATH = @PE_MODULES_PATH@
141 PH_CONFIG_PATH = @PH_CONFIG_PATH@
142 PH_MODULES_PATH = @PH_MODULES_PATH@
132143 PKG_CONFIG = @PKG_CONFIG@
133144 POSUB = @POSUB@
134145 PY_CFLAGS = @PY_CFLAGS@
135146 PY_MODULES_PATH = @PY_MODULES_PATH@
136147 PY_VERSION = @PY_VERSION@
137148 RANLIB = @RANLIB@
149 RU_CFLAGS = @RU_CFLAGS@
150 RU_MODULES_PATH = @RU_MODULES_PATH@
151 RU_VERSION = @RU_VERSION@
138152 SED = @SED@
139153 SET_MAKE = @SET_MAKE@
140154 SHELL = @SHELL@
148162 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
149163 WITH_PERL_FALSE = @WITH_PERL_FALSE@
150164 WITH_PERL_TRUE = @WITH_PERL_TRUE@
165 WITH_PHP_FALSE = @WITH_PHP_FALSE@
166 WITH_PHP_TRUE = @WITH_PHP_TRUE@
151167 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
152168 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
169 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
170 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
153171 XGETTEXT = @XGETTEXT@
154172 XGETTEXT_015 = @XGETTEXT_015@
155173 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
178196 exec_prefix = @exec_prefix@
179197 have_pascal = @have_pascal@
180198 have_perl = @have_perl@
199 have_php = @have_php@
200 have_php_config = @have_php_config@
181201 have_python = @have_python@
202 have_ruby = @have_ruby@
182203 have_swig = @have_swig@
183204 host = @host@
184205 host_alias = @host_alias@
204225 sharedstatedir = @sharedstatedir@
205226 sysconfdir = @sysconfdir@
206227 target_alias = @target_alias@
207 EXTRA_DIST = hdate_cpp.cpp hdate_python.py hdate_perl.pl hdate_pascal.pp
228 SUBDIRS = pascal
229 EXTRA_DIST = hdate_cpp.cpp hdate_python.py hdate_perl.pl hdate_ruby.rb hdate_php.php
208230 libhdatedocdir = ${prefix}/share/doc/libhdate/examples/bindings
209 libhdatedoc_DATA = hdate_cpp.cpp hdate_python.py hdate_perl.pl hdate_pascal.pp
210 all: all-am
231 libhdatedoc_DATA = hdate_cpp.cpp hdate_python.py hdate_perl.pl hdate_ruby.rb hdate_php.php
232 all: all-recursive
211233
212234 .SUFFIXES:
213235 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
266288 echo " rm -f '$(DESTDIR)$(libhdatedocdir)/$$f'"; \
267289 rm -f "$(DESTDIR)$(libhdatedocdir)/$$f"; \
268290 done
291
292 # This directory's subdirectories are mostly independent; you can cd
293 # into them and run `make' without going through this Makefile.
294 # To change the values of `make' variables: instead of editing Makefiles,
295 # (1) if the variable is set in `config.status', edit `config.status'
296 # (which will cause the Makefiles to be regenerated when you run `make');
297 # (2) otherwise, pass the desired values on the `make' command line.
298 $(RECURSIVE_TARGETS):
299 @failcom='exit 1'; \
300 for f in x $$MAKEFLAGS; do \
301 case $$f in \
302 *=* | --[!k]*);; \
303 *k*) failcom='fail=yes';; \
304 esac; \
305 done; \
306 dot_seen=no; \
307 target=`echo $@ | sed s/-recursive//`; \
308 list='$(SUBDIRS)'; for subdir in $$list; do \
309 echo "Making $$target in $$subdir"; \
310 if test "$$subdir" = "."; then \
311 dot_seen=yes; \
312 local_target="$$target-am"; \
313 else \
314 local_target="$$target"; \
315 fi; \
316 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
317 || eval $$failcom; \
318 done; \
319 if test "$$dot_seen" = "no"; then \
320 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
321 fi; test -z "$$fail"
322
323 mostlyclean-recursive clean-recursive distclean-recursive \
324 maintainer-clean-recursive:
325 @failcom='exit 1'; \
326 for f in x $$MAKEFLAGS; do \
327 case $$f in \
328 *=* | --[!k]*);; \
329 *k*) failcom='fail=yes';; \
330 esac; \
331 done; \
332 dot_seen=no; \
333 case "$@" in \
334 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
335 *) list='$(SUBDIRS)' ;; \
336 esac; \
337 rev=''; for subdir in $$list; do \
338 if test "$$subdir" = "."; then :; else \
339 rev="$$subdir $$rev"; \
340 fi; \
341 done; \
342 rev="$$rev ."; \
343 target=`echo $@ | sed s/-recursive//`; \
344 for subdir in $$rev; do \
345 echo "Making $$target in $$subdir"; \
346 if test "$$subdir" = "."; then \
347 local_target="$$target-am"; \
348 else \
349 local_target="$$target"; \
350 fi; \
351 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
352 || eval $$failcom; \
353 done && test -z "$$fail"
354 tags-recursive:
355 list='$(SUBDIRS)'; for subdir in $$list; do \
356 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
357 done
358 ctags-recursive:
359 list='$(SUBDIRS)'; for subdir in $$list; do \
360 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
361 done
362
363 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
364 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
365 unique=`for i in $$list; do \
366 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
367 done | \
368 $(AWK) ' { files[$$0] = 1; } \
369 END { for (i in files) print i; }'`; \
370 mkid -fID $$unique
269371 tags: TAGS
270 TAGS:
271
372
373 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
374 $(TAGS_FILES) $(LISP)
375 tags=; \
376 here=`pwd`; \
377 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
378 include_option=--etags-include; \
379 empty_fix=.; \
380 else \
381 include_option=--include; \
382 empty_fix=; \
383 fi; \
384 list='$(SUBDIRS)'; for subdir in $$list; do \
385 if test "$$subdir" = .; then :; else \
386 test ! -f $$subdir/TAGS || \
387 tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
388 fi; \
389 done; \
390 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
391 unique=`for i in $$list; do \
392 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
393 done | \
394 $(AWK) ' { files[$$0] = 1; } \
395 END { for (i in files) print i; }'`; \
396 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
397 test -n "$$unique" || unique=$$empty_fix; \
398 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
399 $$tags $$unique; \
400 fi
272401 ctags: CTAGS
273 CTAGS:
274
402 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
403 $(TAGS_FILES) $(LISP)
404 tags=; \
405 here=`pwd`; \
406 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
407 unique=`for i in $$list; do \
408 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
409 done | \
410 $(AWK) ' { files[$$0] = 1; } \
411 END { for (i in files) print i; }'`; \
412 test -z "$(CTAGS_ARGS)$$tags$$unique" \
413 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
414 $$tags $$unique
415
416 GTAGS:
417 here=`$(am__cd) $(top_builddir) && pwd` \
418 && cd $(top_srcdir) \
419 && gtags -i $(GTAGS_ARGS) $$here
420
421 distclean-tags:
422 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
275423
276424 distdir: $(DISTFILES)
277425 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
300448 || exit 1; \
301449 fi; \
302450 done
451 list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
452 if test "$$subdir" = .; then :; else \
453 test -d "$(distdir)/$$subdir" \
454 || $(mkdir_p) "$(distdir)/$$subdir" \
455 || exit 1; \
456 distdir=`$(am__cd) $(distdir) && pwd`; \
457 top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
458 (cd $$subdir && \
459 $(MAKE) $(AM_MAKEFLAGS) \
460 top_distdir="$$top_distdir" \
461 distdir="$$distdir/$$subdir" \
462 distdir) \
463 || exit 1; \
464 fi; \
465 done
303466 check-am: all-am
304 check: check-am
467 check: check-recursive
305468 all-am: Makefile $(DATA)
306 installdirs:
469 installdirs: installdirs-recursive
470 installdirs-am:
307471 for dir in "$(DESTDIR)$(libhdatedocdir)"; do \
308472 test -z "$$dir" || $(mkdir_p) "$$dir"; \
309473 done
310 install: install-am
311 install-exec: install-exec-am
312 install-data: install-data-am
313 uninstall: uninstall-am
474 install: install-recursive
475 install-exec: install-exec-recursive
476 install-data: install-data-recursive
477 uninstall: uninstall-recursive
314478
315479 install-am: all-am
316480 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
317481
318 installcheck: installcheck-am
482 installcheck: installcheck-recursive
319483 install-strip:
320484 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
321485 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
331495 maintainer-clean-generic:
332496 @echo "This command is intended for maintainers to use"
333497 @echo "it deletes files that may require special tools to rebuild."
334 clean: clean-am
498 clean: clean-recursive
335499
336500 clean-am: clean-generic clean-libtool mostlyclean-am
337501
338 distclean: distclean-am
502 distclean: distclean-recursive
339503 -rm -f Makefile
340 distclean-am: clean-am distclean-generic distclean-libtool
341
342 dvi: dvi-am
504 distclean-am: clean-am distclean-generic distclean-libtool \
505 distclean-tags
506
507 dvi: dvi-recursive
343508
344509 dvi-am:
345510
346 html: html-am
347
348 info: info-am
511 html: html-recursive
512
513 info: info-recursive
349514
350515 info-am:
351516
353518
354519 install-exec-am:
355520
356 install-info: install-info-am
521 install-info: install-info-recursive
357522
358523 install-man:
359524
360525 installcheck-am:
361526
362 maintainer-clean: maintainer-clean-am
527 maintainer-clean: maintainer-clean-recursive
363528 -rm -f Makefile
364529 maintainer-clean-am: distclean-am maintainer-clean-generic
365530
366 mostlyclean: mostlyclean-am
531 mostlyclean: mostlyclean-recursive
367532
368533 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
369534
370 pdf: pdf-am
535 pdf: pdf-recursive
371536
372537 pdf-am:
373538
374 ps: ps-am
539 ps: ps-recursive
375540
376541 ps-am:
377542
378543 uninstall-am: uninstall-info-am uninstall-libhdatedocDATA
379544
380 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
381 distclean distclean-generic distclean-libtool distdir dvi \
382 dvi-am html html-am info info-am install install-am \
383 install-data install-data-am install-exec install-exec-am \
384 install-info install-info-am install-libhdatedocDATA \
385 install-man install-strip installcheck installcheck-am \
386 installdirs maintainer-clean maintainer-clean-generic \
387 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
388 ps ps-am uninstall uninstall-am uninstall-info-am \
545 uninstall-info: uninstall-info-recursive
546
547 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
548 clean clean-generic clean-libtool clean-recursive ctags \
549 ctags-recursive distclean distclean-generic distclean-libtool \
550 distclean-recursive distclean-tags distdir dvi dvi-am html \
551 html-am info info-am install install-am install-data \
552 install-data-am install-exec install-exec-am install-info \
553 install-info-am install-libhdatedocDATA install-man \
554 install-strip installcheck installcheck-am installdirs \
555 installdirs-am maintainer-clean maintainer-clean-generic \
556 maintainer-clean-recursive mostlyclean mostlyclean-generic \
557 mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
558 tags tags-recursive uninstall uninstall-am uninstall-info-am \
389559 uninstall-libhdatedocDATA
390560
391561 # Tell versions [3.59,3.63) of GNU make to not export all variables.
33
44 //
55 // compile: g++ -lm -lhdate -o hdate_cpp hdate_cpp.cpp
6 //
7
8 //
9 // Copyright (C) 2008 Yaacov Zamir <kzamir@walla.co.il>
10 //
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
623 //
724
825 #include <iostream>
1835 Hdate h;
1936
2037 // print gregorian date
21 cout << "Today is :\n";
22 cout << h.get_gday () << "," << h.get_gmonth () << "," << h.get_gyear () << "\n";
38 cout << "Today is :" << endl;
39 cout << h.get_gday () << "," << h.get_gmonth () << "," << h.get_gyear () << endl;
2340
2441 // print hebrew date: 0 - long format
25 cout << h.get_format_date (0);
26 cout << "\n";
42 cout << h.get_format_date (0) << endl;
2743
2844 return 0;
2945 }
+0
-28
current/examples/bindings/hdate_pascal.pp less more
0 {$MODE OBJFPC}
1 {$IFDEF MSWINDOWS}
2 {$APPTYPE CONSOLE} //Make sure that in Windows we will be in a console mode
3 {$ENDIF}
4 program hdate_demo;
5 uses hdate_class, hdate;
6
7 var
8 h : THdateClass;
9 diaspora : Integer;
10
11 begin
12 h := THdateClass.Create;
13 diaspora := 0;
14
15 try
16
17 // print gregorian date
18 write ('Today : ', h.GregDay, ',');
19 write (h.GregMonth, ',');
20 writeln (h.GregYear);
21
22 // print hebrew date
23 writeln (h.get_format_date (diaspora));
24 finally
25 h.Free;
26 end;
27 end.
00 #! /usr/bin/perl
1
2 # hdate_perl.pl
3 # example file for libhdate.
4 #
5
6 #
7 # run: perl hdate_perl.pl
8 #
9
10 #
11 # Copyright (C) 2008 Yaacov Zamir <kzamir@walla.co.il>
12 #
13 # This program is free software: you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation, either version 3 of the License, or
16 # (at your option) any later version.
17 #
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
22 #
23 # You should have received a copy of the GNU General Public License
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #
126
227 # Use the hdate perl module
328 use hdate;
0 #! /usr/bin/php
1 <?php
2
3 # hdate_php.php
4 # example file for libhdate.
5 #
6
7 #
8 # run: php hdate_php.php
9 #
10
11 #
12 # Copyright (C) 2008 Yaacov Zamir <kzamir@walla.co.il>
13 #
14 # This program is free software: you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation, either version 3 of the License, or
17 # (at your option) any later version.
18 #
19 # This program is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
23 #
24 # You should have received a copy of the GNU General Public License
25 # along with this program. If not, see <http://www.gnu.org/licenses/>.
26 #
27
28 # Create a new Hdate object
29 $h = new_Hdate();
30
31 # Print gregorian date
32 echo "Today is:\n";
33 echo Hdate_get_gday($h).".".Hdate_get_gmonth($h).",".Hdate_get_gyear($h)."\n";
34
35 # Print hebrew date: 0 - long format
36 echo Hdate_get_format_date($h, 0)."\n";
37
38 ?>
00 #! /usr/bin/python
11
2 # hdate_python.py
3 # example file for libhdate.
4 #
5
6 #
7 # run: python hdate_python.py
8 #
9
10 #
11 # Copyright (C) 2008 Yaacov Zamir <kzamir@walla.co.il>
12 #
13 # This program is free software: you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation, either version 3 of the License, or
16 # (at your option) any later version.
17 #
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
22 #
23 # You should have received a copy of the GNU General Public License
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #
26
27 # Use locale to support hdate localization
28 import locale
29 locale.setlocale(locale.LC_ALL,'')
30
231 # Import the hdate library
332 from hdate import *;
433
534 # Create a new Hdate object
6 h = Hdate();
35 h = Hdate ();
736
837 # Print gregorian date
938 print "Today is:"
10 print str (h.get_gday ()) + "," + str (h.get_gmonth()) + "," + str (h.get_gyear ())
39 print str (h.get_gday ()) + "," + str (h.get_gmonth ()) + "," + str (h.get_gyear ())
1140
1241 # Print hebrew date: 0 - long format
1342 print h.get_format_date (0);
0 #! /usr/bin/ruby
1
2 # hdate_ruby.rb
3 # example file for libhdate.
4 #
5
6 #
7 # run: ruby hdate_ruby.rb
8 #
9
10 #
11 # Copyright (C) 2008 Yaacov Zamir <kzamir@walla.co.il>
12 #
13 # This program is free software: you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation, either version 3 of the License, or
16 # (at your option) any later version.
17 #
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
22 #
23 # You should have received a copy of the GNU General Public License
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #
26
27 # Import the hdate library
28 require 'hdate'
29
30 # Create a new Hdate object
31 h = Hdate::Hdate.new
32
33 # Print gregorian date
34 puts "Today is:"
35 puts "#{h.get_gday()},#{h.get_gmonth()},#{h.get_gyear()}"
36
37 # Print hebrew date: 0 - long format
38 puts h.get_format_date(0);
0 EXTRA_DIST = hdate_class.pp hdate_obj.pp hdate_pascal.pp
1
2 libhdatedocdir = ${prefix}/share/doc/libhdate/examples/bindings/pascal
3 libhdatedoc_DATA = hdate_class.pp hdate_obj.pp hdate_pascal.pp
0 # Makefile.in generated by automake 1.9.6 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 srcdir = @srcdir@
17 top_srcdir = @top_srcdir@
18 VPATH = @srcdir@
19 pkgdatadir = $(datadir)/@PACKAGE@
20 pkglibdir = $(libdir)/@PACKAGE@
21 pkgincludedir = $(includedir)/@PACKAGE@
22 top_builddir = ../../..
23 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24 INSTALL = @INSTALL@
25 install_sh_DATA = $(install_sh) -c -m 644
26 install_sh_PROGRAM = $(install_sh) -c
27 install_sh_SCRIPT = $(install_sh) -c
28 INSTALL_HEADER = $(INSTALL_DATA)
29 transform = $(program_transform_name)
30 NORMAL_INSTALL = :
31 PRE_INSTALL = :
32 POST_INSTALL = :
33 NORMAL_UNINSTALL = :
34 PRE_UNINSTALL = :
35 POST_UNINSTALL = :
36 build_triplet = @build@
37 host_triplet = @host@
38 subdir = examples/bindings/pascal
39 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
40 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
42 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
43 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
44 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
45 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
46 $(top_srcdir)/configure.in
47 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
48 $(ACLOCAL_M4)
49 mkinstalldirs = $(install_sh) -d
50 CONFIG_CLEAN_FILES =
51 SOURCES =
52 DIST_SOURCES =
53 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
54 am__vpath_adj = case $$p in \
55 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
56 *) f=$$p;; \
57 esac;
58 am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
59 am__installdirs = "$(DESTDIR)$(libhdatedocdir)"
60 libhdatedocDATA_INSTALL = $(INSTALL_DATA)
61 DATA = $(libhdatedoc_DATA)
62 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
63 ACLOCAL = @ACLOCAL@
64 AMDEP_FALSE = @AMDEP_FALSE@
65 AMDEP_TRUE = @AMDEP_TRUE@
66 AMTAR = @AMTAR@
67 AR = @AR@
68 AUTOCONF = @AUTOCONF@
69 AUTOHEADER = @AUTOHEADER@
70 AUTOMAKE = @AUTOMAKE@
71 AWK = @AWK@
72 CC = @CC@
73 CCDEPMODE = @CCDEPMODE@
74 CFLAGS = @CFLAGS@
75 CPP = @CPP@
76 CPPFLAGS = @CPPFLAGS@
77 CXX = @CXX@
78 CXXCPP = @CXXCPP@
79 CXXDEPMODE = @CXXDEPMODE@
80 CXXFLAGS = @CXXFLAGS@
81 CYGPATH_W = @CYGPATH_W@
82 DATADIRNAME = @DATADIRNAME@
83 DEFS = @DEFS@
84 DEPDIR = @DEPDIR@
85 ECHO = @ECHO@
86 ECHO_C = @ECHO_C@
87 ECHO_N = @ECHO_N@
88 ECHO_T = @ECHO_T@
89 EGREP = @EGREP@
90 EXEEXT = @EXEEXT@
91 F77 = @F77@
92 FFLAGS = @FFLAGS@
93 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
94 GMSGFMT = @GMSGFMT@
95 GMSGFMT_015 = @GMSGFMT_015@
96 GREP = @GREP@
97 INSTALL_DATA = @INSTALL_DATA@
98 INSTALL_PROGRAM = @INSTALL_PROGRAM@
99 INSTALL_SCRIPT = @INSTALL_SCRIPT@
100 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
101 INTLLIBS = @INTLLIBS@
102 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
103 LDFLAGS = @LDFLAGS@
104 LIBICONV = @LIBICONV@
105 LIBINTL = @LIBINTL@
106 LIBOBJS = @LIBOBJS@
107 LIBS = @LIBS@
108 LIBTOOL = @LIBTOOL@
109 LN_S = @LN_S@
110 LTLIBICONV = @LTLIBICONV@
111 LTLIBINTL = @LTLIBINTL@
112 LTLIBOBJS = @LTLIBOBJS@
113 MAINT = @MAINT@
114 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
115 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
116 MAKEINFO = @MAKEINFO@
117 MSGFMT = @MSGFMT@
118 MSGFMT_015 = @MSGFMT_015@
119 MSGMERGE = @MSGMERGE@
120 OBJEXT = @OBJEXT@
121 PACKAGE = @PACKAGE@
122 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
123 PACKAGE_NAME = @PACKAGE_NAME@
124 PACKAGE_STRING = @PACKAGE_STRING@
125 PACKAGE_TARNAME = @PACKAGE_TARNAME@
126 PACKAGE_VERSION = @PACKAGE_VERSION@
127 PATH_SEPARATOR = @PATH_SEPARATOR@
128 PA_MODULES_PATH = @PA_MODULES_PATH@
129 PA_VERSION = @PA_VERSION@
130 PE_CFLAGS = @PE_CFLAGS@
131 PE_MODULES_PATH = @PE_MODULES_PATH@
132 PH_CONFIG_PATH = @PH_CONFIG_PATH@
133 PH_MODULES_PATH = @PH_MODULES_PATH@
134 PKG_CONFIG = @PKG_CONFIG@
135 POSUB = @POSUB@
136 PY_CFLAGS = @PY_CFLAGS@
137 PY_MODULES_PATH = @PY_MODULES_PATH@
138 PY_VERSION = @PY_VERSION@
139 RANLIB = @RANLIB@
140 RU_CFLAGS = @RU_CFLAGS@
141 RU_MODULES_PATH = @RU_MODULES_PATH@
142 RU_VERSION = @RU_VERSION@
143 SED = @SED@
144 SET_MAKE = @SET_MAKE@
145 SHELL = @SHELL@
146 STRIP = @STRIP@
147 USE_NLS = @USE_NLS@
148 VERSION = @VERSION@
149 VERSION_INFO = @VERSION_INFO@
150 WITH_HCAL_FALSE = @WITH_HCAL_FALSE@
151 WITH_HCAL_TRUE = @WITH_HCAL_TRUE@
152 WITH_PASCAL_FALSE = @WITH_PASCAL_FALSE@
153 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
154 WITH_PERL_FALSE = @WITH_PERL_FALSE@
155 WITH_PERL_TRUE = @WITH_PERL_TRUE@
156 WITH_PHP_FALSE = @WITH_PHP_FALSE@
157 WITH_PHP_TRUE = @WITH_PHP_TRUE@
158 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
159 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
160 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
161 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
162 XGETTEXT = @XGETTEXT@
163 XGETTEXT_015 = @XGETTEXT_015@
164 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
165 ac_ct_CC = @ac_ct_CC@
166 ac_ct_CXX = @ac_ct_CXX@
167 ac_ct_F77 = @ac_ct_F77@
168 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
169 am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
170 am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
171 am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
172 am__include = @am__include@
173 am__leading_dot = @am__leading_dot@
174 am__quote = @am__quote@
175 am__tar = @am__tar@
176 am__untar = @am__untar@
177 bindir = @bindir@
178 build = @build@
179 build_alias = @build_alias@
180 build_cpu = @build_cpu@
181 build_os = @build_os@
182 build_vendor = @build_vendor@
183 datadir = @datadir@
184 datarootdir = @datarootdir@
185 docdir = @docdir@
186 dvidir = @dvidir@
187 exec_prefix = @exec_prefix@
188 have_pascal = @have_pascal@
189 have_perl = @have_perl@
190 have_php = @have_php@
191 have_php_config = @have_php_config@
192 have_python = @have_python@
193 have_ruby = @have_ruby@
194 have_swig = @have_swig@
195 host = @host@
196 host_alias = @host_alias@
197 host_cpu = @host_cpu@
198 host_os = @host_os@
199 host_vendor = @host_vendor@
200 htmldir = @htmldir@
201 includedir = @includedir@
202 infodir = @infodir@
203 install_sh = @install_sh@
204 libdir = @libdir@
205 libexecdir = @libexecdir@
206 localedir = @localedir@
207 localstatedir = @localstatedir@
208 mandir = @mandir@
209 mkdir_p = @mkdir_p@
210 oldincludedir = @oldincludedir@
211 pdfdir = @pdfdir@
212 prefix = @prefix@
213 program_transform_name = @program_transform_name@
214 psdir = @psdir@
215 sbindir = @sbindir@
216 sharedstatedir = @sharedstatedir@
217 sysconfdir = @sysconfdir@
218 target_alias = @target_alias@
219 EXTRA_DIST = hdate_class.pp hdate_obj.pp hdate_pascal.pp
220 libhdatedocdir = ${prefix}/share/doc/libhdate/examples/bindings/pascal
221 libhdatedoc_DATA = hdate_class.pp hdate_obj.pp hdate_pascal.pp
222 all: all-am
223
224 .SUFFIXES:
225 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
226 @for dep in $?; do \
227 case '$(am__configure_deps)' in \
228 *$$dep*) \
229 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
230 && exit 0; \
231 exit 1;; \
232 esac; \
233 done; \
234 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/bindings/pascal/Makefile'; \
235 cd $(top_srcdir) && \
236 $(AUTOMAKE) --gnu examples/bindings/pascal/Makefile
237 .PRECIOUS: Makefile
238 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
239 @case '$?' in \
240 *config.status*) \
241 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
242 *) \
243 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
244 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
245 esac;
246
247 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
248 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
249
250 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
251 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
252 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
253 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
254
255 mostlyclean-libtool:
256 -rm -f *.lo
257
258 clean-libtool:
259 -rm -rf .libs _libs
260
261 distclean-libtool:
262 -rm -f libtool
263 uninstall-info-am:
264 install-libhdatedocDATA: $(libhdatedoc_DATA)
265 @$(NORMAL_INSTALL)
266 test -z "$(libhdatedocdir)" || $(mkdir_p) "$(DESTDIR)$(libhdatedocdir)"
267 @list='$(libhdatedoc_DATA)'; for p in $$list; do \
268 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
269 f=$(am__strip_dir) \
270 echo " $(libhdatedocDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(libhdatedocdir)/$$f'"; \
271 $(libhdatedocDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(libhdatedocdir)/$$f"; \
272 done
273
274 uninstall-libhdatedocDATA:
275 @$(NORMAL_UNINSTALL)
276 @list='$(libhdatedoc_DATA)'; for p in $$list; do \
277 f=$(am__strip_dir) \
278 echo " rm -f '$(DESTDIR)$(libhdatedocdir)/$$f'"; \
279 rm -f "$(DESTDIR)$(libhdatedocdir)/$$f"; \
280 done
281 tags: TAGS
282 TAGS:
283
284 ctags: CTAGS
285 CTAGS:
286
287
288 distdir: $(DISTFILES)
289 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
290 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
291 list='$(DISTFILES)'; for file in $$list; do \
292 case $$file in \
293 $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
294 $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
295 esac; \
296 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
297 dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
298 if test "$$dir" != "$$file" && test "$$dir" != "."; then \
299 dir="/$$dir"; \
300 $(mkdir_p) "$(distdir)$$dir"; \
301 else \
302 dir=''; \
303 fi; \
304 if test -d $$d/$$file; then \
305 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
306 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
307 fi; \
308 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
309 else \
310 test -f $(distdir)/$$file \
311 || cp -p $$d/$$file $(distdir)/$$file \
312 || exit 1; \
313 fi; \
314 done
315 check-am: all-am
316 check: check-am
317 all-am: Makefile $(DATA)
318 installdirs:
319 for dir in "$(DESTDIR)$(libhdatedocdir)"; do \
320 test -z "$$dir" || $(mkdir_p) "$$dir"; \
321 done
322 install: install-am
323 install-exec: install-exec-am
324 install-data: install-data-am
325 uninstall: uninstall-am
326
327 install-am: all-am
328 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
329
330 installcheck: installcheck-am
331 install-strip:
332 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
333 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
334 `test -z '$(STRIP)' || \
335 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
336 mostlyclean-generic:
337
338 clean-generic:
339
340 distclean-generic:
341 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
342
343 maintainer-clean-generic:
344 @echo "This command is intended for maintainers to use"
345 @echo "it deletes files that may require special tools to rebuild."
346 clean: clean-am
347
348 clean-am: clean-generic clean-libtool mostlyclean-am
349
350 distclean: distclean-am
351 -rm -f Makefile
352 distclean-am: clean-am distclean-generic distclean-libtool
353
354 dvi: dvi-am
355
356 dvi-am:
357
358 html: html-am
359
360 info: info-am
361
362 info-am:
363
364 install-data-am: install-libhdatedocDATA
365
366 install-exec-am:
367
368 install-info: install-info-am
369
370 install-man:
371
372 installcheck-am:
373
374 maintainer-clean: maintainer-clean-am
375 -rm -f Makefile
376 maintainer-clean-am: distclean-am maintainer-clean-generic
377
378 mostlyclean: mostlyclean-am
379
380 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
381
382 pdf: pdf-am
383
384 pdf-am:
385
386 ps: ps-am
387
388 ps-am:
389
390 uninstall-am: uninstall-info-am uninstall-libhdatedocDATA
391
392 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
393 distclean distclean-generic distclean-libtool distdir dvi \
394 dvi-am html html-am info info-am install install-am \
395 install-data install-data-am install-exec install-exec-am \
396 install-info install-info-am install-libhdatedocDATA \
397 install-man install-strip installcheck installcheck-am \
398 installdirs maintainer-clean maintainer-clean-generic \
399 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
400 ps ps-am uninstall uninstall-am uninstall-info-am \
401 uninstall-libhdatedocDATA
402
403 # Tell versions [3.59,3.63) of GNU make to not export all variables.
404 # Otherwise a system limit (for SysV at least) may be exceeded.
405 .NOEXPORT:
0
1 {
2 This unit create a Pascal object oriented class for libhdate.
3 This unit is created as a true object oriented class.
4
5 Copyright 2005-2008 Ido Kanner <idokan@gmail.com>
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 History:
21 25/01/2008 - Added support for newer API of hdate
22 12/01/2008 - Added support for dynamic linking
23 19-21/05/2005 - Initial creation
24
25 }
26 {$IFDEF FPC}
27 {$MODE OBJFPC} {$H+}
28 {.$DEFINE STATIC_LINK}
29 {$ELSE}
30 {$Warning 'This code was tested with Free Pascal Only.'}
31 {$ENDIF}
32
33
34 Unit hdate_class;
35
36 Interface
37
38 Uses {$IFDEF STATIC_LINK} hdate {$ELSE} hdate_dyn_pascal {$ENDIF}, SysUtils;
39
40 Type
41
42 { THdateClass }
43 { A class that handle libhdate in the spirit of Object Pascal }
44 THdateClass = Class
45 Private
46 fh : Phdate_struct;
47 FToDestroy : Boolean;
48 fJulianDay : LongInt;
49 fDiaspora : Boolean;
50 fHolyday,
51 fHolydayType : LongInt;
52 fParasha : LongInt;
53 fHebrewDay,
54 fHebrewYear : String;
55
56 Procedure InitValue;
57
58 Procedure SetHebDay (Value : LongInt);
59 Procedure SetGregDay (Value : LongInt);
60 Procedure SetJulianDay (Value : LongInt);
61 Procedure SetHebMonth (Value : LongInt);
62 Procedure SetGregMonth (Value : LongInt);
63 Procedure SetGregYear (Value : LongInt);
64 Procedure SetHebYear (Value : LongInt);
65 Procedure SetDiaspora (Value : Boolean);
66
67 Function GetGregDay : LongInt;
68 Function GetGregMonth : LongInt;
69 Function GetGregYear : LongInt;
70 Function GetHebDay : LongInt;
71 Function GetHebMonth : LongInt;
72 Function GetHebYear : LongInt;
73 Public
74 constructor Create; virtual; overload;
75 constructor Create (hDateRec : Phdate_struct); virtual; overload;
76 destructor Destroy; override;
77
78 { Assign an existed class of THdateClass propetires into the corrent class }
79 Procedure Assign (Source : THdateClass); virtual;
80
81 { Returns a string with formated date according with readable date of s }
82 Function get_format_date (s : LongInt) : String;
83 { Returns the name of day in a week }
84 Function get_day_of_week_string (s : LongInt) : String;
85 { Returns the name of the month }
86 Function get_month_string (s : LongInt) : String;
87 { Returns a name of the Hebrew month }
88 Function get_hebrew_month_string (s : LongInt) : String;
89 { Returnss the name of a Hebrew holyday }
90 Function get_holyday_string (s : LongInt) : String;
91 { Returns the week of the Paragrph that needed to read "Parashat Hashavua" }
92 Function get_parasha_string (s : LongInt) : String;
93 { Returns the day of the week }
94 Function GetDayOfWeek : LongInt;
95 { Returns the size of the Hebrew year }
96 Function get_size_of_year : LongInt;
97 { Returns the day remains until a new Hebrew year starts }
98 Function get_new_year_day_of_the_week : LongInt;
99 { Returns the number of days passed since the begining of the Hebrew year }
100 Function get_days : LongInt;
101 { Returns the number of weeks passed since the begining of the Hebrew year }
102 Function get_weeks : LongInt;
103 { Returns the sunrise in a given Latitude, Longitude and a timezone }
104 Function get_sunrise (latitude, longitude : Double; tz : LongInt) : LongInt;
105 { Returns the sunet in a given Latitude, Longitude and a timezone }
106 Function get_sunset (latitude, longitude : Double; tz : LongInt) : LongInt;
107 { Returns the sunrise in a given day, Latitude, Longitude and a Degree }
108 function get_deg_sunrise (Date : TDateTime;
109 latitude, longitude, deg : Double) : Longint;
110 { Returns the sunet in a given day, Latitude, Longitude and a Degree }
111 function get_deg_sunset (Date : TDateTime;
112 latitude, longitude, deg : Double) : Longint;
113 { Returns the Sha'a zmanit (temporary time) at a given date, Latitude and Longitude }
114 function get_temporary_time (Date : TDateTime;
115 latitude, longitude : Double) : Longint;
116 { Returns the minutes of first light at a given date, Latitude and Longitude }
117 function get_first_light (Date : TDateTime;
118 latitude, longitude : Double) : Longint;
119 { Returns the minutes to give a prayer (placing Tfiling and Talit) at a given date, Latitude and Longitude }
120 function get_prayer_time (Date : TDateTime;
121 latitude, longitude : Double) : Longint;
122 { Returns the minutes of a sunrise at a given date, Latitude and Longitude }
123 function get_time_full_sunrise (Date : TDateTime;
124 latitude, longitude : Double) : Longint;
125 { Returns the minutes of the midday at a given date, Latitude and Longitude }
126 function get_time_full_midday (Date : TDateTime;
127 latitude, longitude : Double) : Longint;
128 { Returns the minutes of a sunet at a given date, Latitude and Longitude }
129 function get_time_full_sunset (Date : TDateTime;
130 latitude, longitude : Double) : Longint;
131 { Returns the minutes to when the first star is showen at a given date, Latitude and Longitude }
132 function get_time_full_first_stars (Date : TDateTime;
133 latitude, longitude : Double) : Longint;
134 { Returns the minutes to when three stars are showen at a given date, Latitude and Longitude }
135 function get_time_full_three_stars (Date : TDateTime;
136 latitude, longitude : Double) : Longint;
137
138 { Get The number of days passed since the beginig of the Hebrew year }
139 property Days : LongInt read get_days;
140 { Get The day of the week }
141 property DayOfWeek : LongInt read GetDayOfWeek;
142 { Get The Hebrew day }
143 property HebrewDay : String read fHebrewDay;
144 { Get The Hebrew year }
145 property HebrewYear : String read fHebrewYear;
146 { Get The Hebrew Holyday }
147 property Holyday : LongInt read fHolyday;
148 { Get The type of the Hebrew Holyday }
149 property HolydayType : LongInt read fHolydayType;
150 { Get The number of days to the next year }
151 property NewYearDayOfWeek : LongInt read get_new_year_day_of_the_week;
152 { Get The week parahraph that needed to be read (Parashat Ha'Shavua) }
153 property Parasha : LongInt read fParasha;
154 { Get The number of weeks that passed since the end of the year }
155 property Weeks : LongInt read get_weeks;
156 { Get The size of the the year }
157 property YearSize : Longint read get_size_of_year;
158 Published
159 { Get/Set The Hebrew day }
160 property HebDay : LongInt read GetHebDay write SetHebDay;
161 { Get/Set The Gregorian day }
162 property GregDay : LongInt read GetGregDay write SetGregDay;
163 { Get/Set Set wether we are in Israel or not }
164 property Diaspora : Boolean read fDiaspora write SetDiaspora default True;
165 { Get/Set The Julian day }
166 property JulianDay : LongInt read fJulianDay write SetJulianDay;
167 { Get/Set The Hebrew Month }
168 property HebMonth : LongInt read GetHebMonth write SetHebMonth;
169 { Get/Set The Gregorian month }
170 property GregMonth : LongInt read GetGregMonth write SetGregMonth;
171 { Get/Set To Destroy the hdate record pointer, or the destruction will be made outside the record }
172 property ToDestroy : Boolean read FToDestroy write fToDestroy default True;
173 { Get/Set The gregorian year }
174 property GregYear : LongInt read GetGregYear write SetGregYear;
175 { Get/Set The Hebrew year }
176 property HebYear : LongInt read GetHebYear write SetHebYear;
177 End;
178
179 Implementation
180
181 Procedure THdateClass.InitValue;
182 Var
183 ADay, AMonth, AYear : Word;
184 Begin
185 DecodeDate(SysUtils.Now, AYear, AMonth, ADay);
186 hdate_set_gdate (Fh, ADay, AMonth, AYear);
187 hdate_set_hdate (fh, hdate_get_hday (fh), hdate_get_hmonth (fh), hdate_get_hyear (fh));
188
189 fHebrewDay := StrPas (hdate_get_int_string (fh^.hd_day));
190 fHebrewYear := StrPas (hdate_get_int_string (fh^.hd_year));
191
192 SetJulianDay (hdate_gdate_to_jd (ADay, AMonth, AYear));
193 SetDiaspora (True);
194 End;
195
196 constructor THdateClass.Create;
197 Begin
198 fh := Nil;
199 fh := new_hdate();
200 fToDestroy := True;
201 InitValue;
202 End;
203
204 constructor THdateClass.Create (hDateRec : Phdate_struct);
205 Begin
206 fh := hDateRec;
207 fToDestroy := False;
208 InitValue;
209 End;
210
211 destructor THdateClass.Destroy;
212 Begin
213 If fToDestroy Then
214 delete_hdate (fh);
215
216 inherited;
217 End;
218
219 Procedure THdateClass.SetHebDay (Value : LongInt);
220 Begin
221 hdate_set_hdate (Fh, Value, GetHebMonth, GetHebYear);
222 fHebrewDay := StrPas (hdate_get_int_string (fh^.hd_day));
223 End;
224
225 Procedure THdateClass.SetGregDay (Value : LongInt);
226 Begin
227 hdate_set_gdate (fh, Value, GetGregMonth, GetGregYear);
228 End;
229
230 Procedure THdateClass.SetJulianDay (Value : LongInt);
231 Begin
232 fJulianDay := Value;
233 hdate_set_jd (fh, fJulianDay);
234 End;
235
236 Procedure THdateClass.SetHebMonth (Value : LongInt);
237 Begin
238 hdate_set_hdate (Fh, GetHebDay, Value, GetHebYear);
239 End;
240
241 Procedure THdateClass.SetGregMonth (Value : LongInt);
242 Begin
243 hdate_set_gdate (fh, GetGregDay, Value, GetGregYear);
244 End;
245
246 Procedure THdateClass.SetHebYear (Value : LongInt);
247 Begin
248 hdate_set_hdate (fh, GetHebDay, GetGregMonth, Value);
249 fHebrewYear := StrPas (hdate_get_int_string (fh^.hd_year));
250 End;
251
252 Procedure THdateClass.SetGregYear (Value : LongInt);
253 Begin
254 hdate_set_gdate (fh, GetGregDay, GetGregMonth, Value);
255 End;
256
257 Procedure THdateClass.SetDiaspora (Value : Boolean);
258 Begin
259 fDiaspora := Value;
260 fHolyday := hdate_get_holyday (fh, Longint(FDiaspora));
261 fHolydayType := hdate_get_holyday_type (fHolyday);
262 fParasha := hdate_get_parasha (fh, Longint(fDiaspora));
263 End;
264
265 Function THdateClass.GetGregDay : LongInt;
266 Begin
267 Result := hdate_get_gday (fh);
268 End;
269
270 Function THdateClass.GetGregMonth : LongInt;
271 Begin
272 Result := hdate_get_gmonth (fh);
273 End;
274
275 Function THdateClass.GetGregYear : LongInt;
276 Begin
277 Result := hdate_get_gyear (fh);
278 End;
279
280 Function THdateClass.GetHebDay : LongInt;
281 Begin
282 Result := hdate_get_hday (fh);
283 End;
284
285 Function THdateClass.GetHebMonth : LongInt;
286 Begin
287 Result := hdate_get_hmonth (fh);
288 End;
289
290 Function THdateClass.GetHebYear : LongInt;
291 Begin
292 Result := hdate_get_hyear (fh);
293 End;
294
295 Procedure THdateClass.Assign (Source : THdateClass);
296 Begin
297 If (Not Assigned(Source)) Then
298 Begin
299 raise Exception.Create ('Source is not allocated.');
300 End;
301
302 // Should never happned ... but just in case...
303 Assert (Assigned(Source), 'Source is not allocated.');
304
305 fToDestroy := Source.ToDestroy;
306 HebDay := Source.HebDay;
307 GregDay := Source.GregDay;
308 HebMonth := Source.HebMonth;
309 GregMonth := Source.GregMonth;
310 HebYear := Source.HebYear;
311 GregYear := Source.GregYear;
312
313 SetJulianDay (Source.JulianDay);
314 SetDiaspora (Source.Diaspora);
315 End;
316
317 Function THdateClass.get_format_date (s : LongInt) : String;
318 Begin
319 Result := StrPas (hdate_get_format_date (fh, Longint(fDiaspora), s));
320 End;
321
322 Function THdateClass.get_day_of_week_string (s : LongInt) : String;
323 Begin
324 Result := StrPas (hdate_get_day_string (fh^.hd_dw, s));
325 End;
326
327 Function THdateClass.get_month_string (s : LongInt) : String;
328 Begin
329 Result := StrPas (hdate_get_month_string (fh^.gd_mon, s));
330 End;
331
332 Function THdateClass.get_hebrew_month_string (s : LongInt) : String;
333 Begin
334 Result := StrPas (hdate_get_hebrew_month_string (fh^.hd_mon, s));
335 End;
336
337 Function THdateClass.get_holyday_string (s : LongInt) : String;
338 Begin
339 Result := StrPas (hdate_get_holyday_string (fHolyday, s));
340 End;
341
342 Function THdateClass.get_parasha_string (s : LongInt) : String;
343 Begin
344 Result := StrPas (hdate_get_parasha_string (fParasha, s));
345 End;
346
347 Function THdateClass.GetDayOfWeek : LongInt;
348 Begin
349 Result := hdate_get_day_of_the_week (fh);
350 End;
351
352 Function THdateClass.get_size_of_year : LongInt;
353 Begin
354 Result := hdate_get_size_of_year (fh);
355 End;
356
357 Function THdateClass.get_new_year_day_of_the_week : LongInt;
358 Begin
359 Result := hdate_get_new_year_day_of_the_week (fh);
360 End;
361
362 Function THdateClass.get_days : LongInt;
363 Begin
364 Result := hdate_get_days (fh);
365 End;
366
367 Function THdateClass.get_weeks : LongInt;
368 Begin
369 Result := hdate_get_weeks (fh);
370 End;
371
372 Function THdateClass.get_sunrise (latitude, longitude : Double; tz : LongInt) : LongInt;
373 Var
374 sunrise,
375 sunset : LongInt;
376 Begin
377 hdate_get_utc_sun_time (fh^.gd_day, fh^.gd_mon, fh^.gd_year, latitude, longitude, @sunrise, @sunset);
378 Result := sunrise + tz * 60;
379 End;
380
381 Function THdateClass.get_sunset (latitude, longitude : Double; tz : LongInt) : LongInt;
382 Var
383 sunrise,
384 sunset : LongInt;
385 Begin
386 hdate_get_utc_sun_time (fh^.gd_day, fh^.gd_mon, fh^.gd_year, latitude, longitude, @sunrise, @sunset);
387 Result := sunset + tz * 60;
388 End;
389
390 type
391 TSun_Time_Deg_Type = (stdtSunrise, stdtSunset);
392
393 Function get_sun_time_deg(Date : TDateTime; latitude,longitude,deg : Double; Return_Type :
394 TSun_Time_Deg_Type) : Longint;
395 var
396 Year,
397 Month,
398 Day : word;
399 sunrise,
400 sunset : Longint;
401 begin
402 DecodeDate (Date, Year, Month, Day);
403 hdate_get_utc_sun_time_deg(Day, Month, Year, latitude, longitude, deg, @sunrise, @sunset);
404 case Return_Type of
405 stdtSunrise : Result := sunrise;
406 stdtSunset : Result := sunset;
407 end;
408 end;
409
410 function THdateClass.get_deg_sunrise ( Date : TDateTime; latitude,longitude,deg : Double ) : Longint;
411 begin
412 Result := get_sun_time_deg(Date, latitude, longitude, deg, stdtSunrise);
413 end;
414
415 function THdateClass.get_deg_sunset ( Date : TDateTime; latitude,longitude,deg : Double ) : Longint;
416 begin
417 Result := get_sun_time_deg(Date, latitude, longitude, deg, stdtSunset);
418 end;
419
420 type
421 TSun_time_full_type = (stftTemporaryTime, stftFirstLight, stftPrayerTime,
422 stftSunrise, stftMidday, stftSunset, stftFirstStars,
423 stftThreeStars);
424
425 Function get_sun_time_full_type(Date : TDateTime; latitude,longitude : Double; Return_Type :
426 TSun_time_full_type) : Longint;
427 var
428 Year,
429 Month,
430 Day : word;
431 sun_hour,
432 first_light,
433 talit,
434 sunrise,
435 midday,
436 sunset,
437 first_stars,
438 three_stars : Longint;
439 begin
440 DecodeDate (Date, Year, Month, Day);
441 hdate_get_utc_sun_time_full(Day, Month, Year, latitude, longitude, @sun_hour, @first_light, @talit,
442 @sunrise, @midday, @sunset, @first_stars, @three_stars);
443 case Return_Type of
444 stftTemporaryTime : Result := sun_hour;
445 stftFirstLight : Result := first_light;
446 stftPrayerTime : Result := talit;
447 stftSunrise : Result := sunrise;
448 stftMidday : Result := midday;
449 stftSunset : Result := sunset;
450 stftFirstStars : Result := first_stars;
451 stftThreeStars : Result := three_stars;
452 end;
453 end;
454
455 function THdateClass.get_temporary_time ( Date : TDateTime; latitude,longitude : Double ) : Longint;
456 begin
457 Result := get_sun_time_full_type(Date, latitude,longitude, stftTemporaryTime);
458 end;
459
460 function THdateClass.get_first_light ( Date : TDateTime; latitude,longitude : Double ) : Longint;
461 begin
462 Result := get_sun_time_full_type(Date, latitude,longitude, stftFirstLight);
463 end;
464
465 function THdateClass.get_prayer_time ( Date : TDateTime; latitude,longitude : Double ) : Longint;
466 begin
467 Result := get_sun_time_full_type(Date, latitude,longitude, stftPrayerTime);
468 end;
469
470 function THdateClass.get_time_full_sunrise ( Date : TDateTime; latitude,longitude : Double ) : Longint;
471 begin
472 Result := get_sun_time_full_type(Date, latitude,longitude, stftSunrise);
473 end;
474
475 function THdateClass.get_time_full_midday ( Date : TDateTime; latitude,longitude : Double ) : Longint;
476 begin
477 Result := get_sun_time_full_type(Date, latitude,longitude, stftMidday);
478 end;
479
480 function THdateClass.get_time_full_sunset ( Date : TDateTime; latitude,longitude : Double ) : Longint;
481 begin
482 Result := get_sun_time_full_type(Date, latitude,longitude, stftSunset);
483 end;
484
485 function THdateClass.get_time_full_first_stars ( Date : TDateTime; latitude,longitude : Double ) : Longint;
486 begin
487 Result := get_sun_time_full_type(Date, latitude,longitude, stftFirstStars);
488 end;
489
490 function THdateClass.get_time_full_three_stars ( Date : TDateTime; latitude,longitude : Double ) : Longint;
491 begin
492 Result := get_sun_time_full_type(Date, latitude,longitude, stftThreeStars);
493 end;
494
495 End.
496
0 { libhdate
1 Copyright 2004-2005 Yaacov Zamir <kzamir@walla.co.il>
2 Copyright 2005 Ido Kanner <idokan@gmail.com>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Library General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18 History:
19 11/10/2005 - Initial Translation of version 0.31.0
20 }
21
22 {$MODE OBJFPC}
23 unit hdate_obj;
24
25 interface
26 uses cTypes, hDate, SysUtils;
27
28 type
29 THdate = class
30 private
31 h : Phdate_struct;
32 public
33 constructor Create; virtual;
34 destructor Destroy; override;
35 ////////////////////////////////////////
36 ////////////////////////////////////////
37
38 (**
39 @brief compute date structure from the Gregorian date
40
41 @param d Day of month 1..31
42 @param m Month 1..12 , if m or d is 0 return current date.
43 @param y Year in 4 digits e.g. 2001
44 *)
45 procedure set_gdate (d, m, y : cInt);
46
47 (**
48 @brief compute date structure from the Hebrew date
49
50 @param d Day of month 1..31
51 @param m Month 1..14 , if m or d is 0 return current date.
52 @param y Year in 4 digits e.g. 5731
53 *)
54 procedure set_hdate (d, m, y : cInt);
55
56 (**
57 @brief compute date structure from the Julian day
58
59 @param jd the julian day number.
60 *)
61 procedure set_jd (jd : cInt);
62
63 ////////////////////////////////////////
64 ////////////////////////////////////////
65
66 (**
67 @brief get formated hebrew date.
68
69 return the short ( e.g. "1 Tishrey" ) or
70 long (e.g. "Tuesday 18 Tishrey 5763 Hol hamoed Sukot" ) formated date.
71
72 @param diaspora if true give diaspora holydays.
73 @param s short flag.
74 @return a static string of foramted date
75 *)
76 function get_format_date (diaspora, s : cInt) : String;
77
78 (**
79 @brief get name of week day.
80
81 @param s short flag
82 true - returns a short string: sun, false returns: sunday.
83 @return a static string of the day of the week
84 *)
85 function get_day_of_week_string (s : cInt) : String;
86
87 (**
88 @brief get name month.
89
90 @param s short flag
91 true - returns a short string: Mar, false returns: March.
92 @return a static string of month name
93 *)
94 function get_month_string (s : cInt) : String;
95
96 (**
97 @brief get name hebrew month.
98
99 @param s short flag
100 true - returns a short string.
101 @return a static string of hebrew month name
102 *)
103 function get_hebrew_month_string (s : cInt) : String;
104
105 (**
106 @brief get name hebrew holiday.
107
108 @param s short flag
109 true - returns a short string.
110 @return a static string of hebrew holiday name
111 *)
112 function get_holyday_string (diaspora, s : cInt) : String;
113
114 (**
115 @brief get the hebrew holiday type.
116
117 @return the holiday type
118 (1- regular holyday, 2- three regels, 3- tzom, 0- no holiday)
119 *)
120 function get_holyday_type (diaspora : cInt) : cInt;
121
122 (**
123 @brief get name hebrew parasha.
124
125 @param diaspora if true give diaspora parashot.
126 @param s short flag
127 true - returns a short string.
128 @return a static string of hebrew parash name
129 *)
130 function get_parasha_string (diaspora, s : cInt) : String;
131
132 (**
133 @brief get name hebrew year.
134
135 @return a static string of hebrew year
136 *)
137 function get_hebrew_year_string : String;
138
139 (**
140 @brief get name hebrew hebrew day of the month
141
142 @return a static string of hebrew day of the month
143 *)
144 function get_hebrew_day_string : String;
145
146 ////////////////////////////////////////
147 ////////////////////////////////////////
148
149 (**
150 @brief get parash number
151
152 @param diaspora if true give diaspora parashot.
153 @return the hebrew parasha number
154 *)
155 function get_parasha (diaspora : cInt) : cInt;
156
157 (**
158 @brief get holiday number
159
160 @param diaspora if true give diaspora holidays.
161 @return the hebrew holiday number
162 *)
163 function get_holyday (diaspora : cInt) : cInt;
164
165 (**
166 @brief get Gregorian day of the month
167
168 @return the Gregorian day of the month
169 *)
170 function get_gday : cInt;
171
172 (**
173 @brief get Gregorian month
174
175 @return the Gregorian month
176 *)
177 function get_gmonth : cInt;
178
179 (**
180 @brief get Gregorian year
181
182 @return the Gregorian year
183 *)
184 function get_gyear : cInt;
185
186 (**
187 @brief get Hebrew day of the month
188
189 @return the Hebrew day of the month
190 *)
191 function get_hday : cInt;
192
193 (**
194 @brief get Hebrew month
195
196 @return the Hebrew month
197 *)
198 function get_hmonth : cInt;
199
200 (**
201 @brief get Hebrew year
202
203 @return the Hebrew year
204 *)
205 function get_hyear : cInt;
206
207 (**
208 @brief get the day of the week
209
210 @return the day of the week
211 *)
212 function get_day_of_the_week : cInt;
213
214 (**
215 @brief get the size of the Hebrew year in days
216
217 @return the size of the Hebrew year in days
218 *)
219 function get_size_of_year : cInt;
220
221 (**
222 @brief get the day of the week of hebrew new years
223
224 @return the day of the week of hebrew new years
225 *)
226 function get_new_year_day_of_the_week : cInt;
227
228 (**
229 @brief get the Julian day number
230
231 @return the Julian day number
232 *)
233 function get_julian : cInt;
234
235 (**
236 @brief get the number of days sice Tishrey I
237
238 @return the the number of days sice Tishrey I
239 *)
240 function get_days : cInt;
241
242 (**
243 @brief get the number of weeks sice Tishrey I
244
245 @return the the number of weeks sice Tishrey I
246 *)
247 function get_weeks : cInt;
248
249 ////////////////////////////////////////
250 ////////////////////////////////////////
251
252 (**
253 @brief sunrise time
254
255 @param longitude longitude to use in calculations
256 degrees, negative values are east
257 @param latitude latitude to use in calculations
258 degrees, negative values are south
259 @param tz time zone
260 @return sunrise in minutes after midnight (00:00)
261 *)
262 function get_sunrise (latitude, longitude : cDouble; tz : cInt) : cInt;
263
264 (**
265 @brief sunset time
266
267 @param longitude longitude to use in calculations
268 degrees, negative values are east
269 @param latitude latitude to use in calculations
270 degrees, negative values are south
271 @param tz time zone
272 @return sunset in minutes after midnight (00:00)
273 *)
274 function get_sunset (latitude, longitude : cDouble; tz : cInt) : cInt;
275 end;
276
277 implementation
278
279 constructor THdate.Create;
280 begin
281 h := new_hdate;
282 end;
283
284 destructor THdate.Destroy;
285 begin
286 delete_hdate(h);
287 inherited Destroy;
288 end;
289
290 procedure THdate.set_gdate (d, m, y : cInt);
291 begin
292 hdate_set_gdate (h, d, m, y);
293 end;
294
295 procedure THdate.set_hdate (d, m, y : cInt);
296 begin
297 hdate_set_hdate (h, d, m, y);
298 end;
299
300 procedure THdate.set_jd (jd : cInt);
301 begin
302 hdate_set_jd (h, jd);
303 end;
304
305 function THdate.get_format_date (diaspora, s : cInt) : String;
306 begin
307 Result := StrPas (hdate_get_format_date (h, diaspora, s));
308 end;
309
310 function THdate.get_day_of_week_string (s : cInt) : String;
311 begin
312 Result := StrPas (hdate_get_day_string (h^.hd_dw, s));
313 end;
314
315 function THdate.get_month_string (s : cInt) : String;
316 begin
317 Result := StrPas (hdate_get_month_string (h^.gd_mon, s));
318 end;
319
320 function THdate.get_hebrew_month_string (s : cInt) : String;
321 begin
322 Result := StrPas (hdate_get_hebrew_month_string (h^.hd_mon, s));
323 end;
324
325 function THdate.get_holyday_string (diaspora, s : cInt) : String;
326 var
327 holyday : cInt;
328 begin
329 holyday := hdate_get_holyday (h, diaspora);
330 Result := StrPas (hdate_get_holyday_string (holyday, s));
331 end;
332
333 function THdate.get_holyday_type (diaspora : cInt) : cInt;
334 var
335 holyday : cInt;
336 begin
337 holyday := hdate_get_holyday (h, diaspora);
338 Result := hdate_get_holyday_type (holyday);
339 end;
340
341 function THdate.get_parasha_string (diaspora, s : cInt) : String;
342 var
343 parasha : cInt;
344 begin
345 parasha := hdate_get_parasha (h, diaspora);
346 Result := StrPas (hdate_get_parasha_string (parasha, s));
347 end;
348
349 function THdate.get_hebrew_year_string : String;
350 begin
351 Result := StrPas (hdate_get_int_string (h^.hd_year));
352 end;
353
354 function THdate.get_hebrew_day_string : String;
355 begin
356 Result := StrPas (hdate_get_int_string (h^.hd_day));
357 end;
358
359 function THdate.get_parasha (diaspora : cInt) : cInt;
360 begin
361 Result := hdate_get_parasha (h, diaspora);
362 end;
363
364 function THdate.get_holyday (diaspora : cInt) : cInt;
365 begin
366 Result := hdate_get_holyday (h, diaspora);
367 end;
368
369 function THdate.get_gday : cInt;
370 begin
371 Result := hdate_get_gday (h);
372 end;
373
374 function THdate.get_gmonth : cInt;
375 begin
376 Result := hdate_get_gmonth (h);
377 end;
378
379 function THdate.get_gyear : cInt;
380 begin
381 Result := hdate_get_gyear (h);
382 end;
383
384 function THdate.get_hday : cInt;
385 begin
386 Result := hdate_get_hday (h);
387 end;
388
389 function THdate.get_hmonth : cInt;
390 begin
391 Result := hdate_get_hmonth (h);
392 end;
393
394 function THdate.get_hyear : cInt;
395 begin
396 Result :=hdate_get_hyear (h);
397 end;
398
399 function THdate.get_day_of_the_week : cInt;
400 begin
401 Result := hdate_get_day_of_the_week (h);
402 end;
403
404 function THdate.get_size_of_year : cInt;
405 begin
406 Result := hdate_get_size_of_year (h);
407 end;
408
409 function THdate.get_new_year_day_of_the_week : cInt;
410 begin
411 Result := hdate_get_new_year_day_of_the_week (h);
412 end;
413
414 function THdate.get_julian : cInt;
415 begin
416 Result := hdate_get_julian (h);
417 end;
418
419 function THdate.get_days : cInt;
420 begin
421 Result := hdate_get_days (h);
422 end;
423
424 function THdate.get_weeks : cInt;
425 begin
426 Result := hdate_get_weeks (h);
427 end;
428
429 function THdate.get_sunrise (latitude, longitude : cDouble; tz : cInt) : cInt;
430 var
431 sunrise,
432 sunset : cInt;
433 begin
434 hdate_get_utc_sun_time (h^.gd_day, h^.gd_mon, h^.gd_year, latitude, longitude, @sunrise, @sunset);
435
436 Result := sunrise + tz * 60;
437 end;
438
439 function THdate.get_sunset (latitude, longitude : cDouble; tz : cInt) : cInt;
440 var
441 sunrise,
442 sunset : cInt;
443 begin
444 hdate_get_utc_sun_time (h^.gd_day, h^.gd_mon, h^.gd_year, latitude, longitude, @sunrise, @sunset);
445
446 Result := sunset + tz * 60;
447 end;
448
449 end.
0 (* hdate_pascal.pp
1 example file for libhdate.
2
3 compile: fpc hdate_pascal.pp
4
5 Copyright (C) 2005-2008 Ido Kaner
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *)
20
21 {$MODE OBJFPC} {$H+}
22 {$IFDEF MSWINDOWS}
23 {$APPTYPE CONSOLE} //Make sure that in Windows we will be in a console mode
24 {$ENDIF}
25 program hdate_demo;
26 uses hdate_class, SysUtils, DateUtils;
27
28 type
29 { A record to store city information regarding the Latitude, Longitude and it's name }
30 TCityDetauls = record
31 { The latitude of a given city}
32 Latitude : Double;
33 { The longitude of a given city}
34 Longitude : Double;
35 { The name of a city}
36 Name : ShortString;
37 end;
38
39 // Latitude and Longitude where Taken from from http://wwp.greenwichmeantime.com/time-zone/asia/israel/cities.htm
40 const
41 { The cities in Israel that we have information regarding the Latitude and Longitude }
42 Cities : array[0..19] of TCityDetauls =
43 (
44 { 00 } ( Latitude : 31.78; Longitude : -35.22; Name : 'Jerusalem' ),
45 { 01 } ( Latitude : 32.07; Longitude : -34.77; Name : 'Tel Aviv-Jafa' ),
46 { 02 } ( Latitude : 32.82; Longitude : -34.99; Name : 'Hifa' ),
47 { 03 } ( Latitude : 31.96; Longitude : -34.80; Name : 'Rishon Lezion' ),
48 { 04 } ( Latitude : 31.80; Longitude : -34.64; Name : 'Ashdod' ),
49 { 05 } ( Latitude : 31.25; Longitude : -34.80; Name : 'Be''er Sheva' ),
50 { 06 } ( Latitude : 32.09; Longitude : -34.88; Name : 'Petach Tiqva' ),
51 { 07 } ( Latitude : 32.33; Longitude : -34.86; Name : 'Netanya' ),
52 { 08 } ( Latitude : 32.02; Longitude : -34.76; Name : 'Holon' ),
53 { 09 } ( Latitude : 32.09; Longitude : -34.85; Name : 'B''ene Beraq' ),
54 { 10 } ( Latitude : 32.02; Longitude : -34.75; Name : 'Bat Yam' ),
55 { 11 } ( Latitude : 32.08; Longitude : -34.80; Name : 'Ramat Gan' ),
56 { 12 } ( Latitude : 31.67; Longitude : -34.56; Name : 'Ashqelon' ),
57 { 13 } ( Latitude : 31.89; Longitude : -34.80; Name : 'Rehovot' ),
58 { 14 } ( Latitude : 32.17; Longitude : -34.84; Name : 'Herzeliyya' ),
59 { 15 } ( Latitude : 32.19; Longitude : -34.91; Name : 'Kfar Saba' ),
60 { 16 } ( Latitude : 32.45; Longitude : -34.92; Name : 'Hadera' ),
61 { 17 } ( Latitude : 32.19; Longitude : -34.88; Name : 'Ra''anana' ),
62 { 18 } ( Latitude : 31.96; Longitude : -34.90; Name : 'Lod' ),
63 { 19 } ( Latitude : 31.93; Longitude : -34.86; Name : 'Ramla' )
64 );
65
66 { Convert the given minutes into full TTime and retrun it as a string
67 Params:
68 minute - The number of minutes since the start of the day}
69 function MinutesToHours(minute : Longint) : String;
70 begin
71 MinutesToHours := TimeToStr(OneMinute * minute);
72 end;
73
74 var
75 { Our hdate class }
76 h : THdateClass;
77 { A variable that saves the flag for Israel or the rest of the world }
78 diaspora : Integer;
79 { Israel's time zone in hours, used to adjust utc times (GMT) to locale time }
80 time_zone : Integer;
81 { Temporary Storing of the minutes for specific query }
82 tmp : Longint;
83 { The degree of the sunrise/sunset that we are looking at, default is 90 }
84 deg : Longint;
85 { The Longitude of a city }
86 Long : Double;
87 { The Latitude of a city }
88 Lat : Double;
89 { The name of a city }
90 LongLatName : String;
91 { The for loop counter }
92 i : integer;
93
94 begin
95 h := THdateClass.Create;
96 diaspora := 0;
97 time_zone := 2;
98
99 try
100 // print gregorian date
101 writeln (Format('Today: %0.2d/%0.2d/%4d',[h.GregDay,h.GregMonth,h.GregYear]));
102
103 // print hebrew date
104 writeln (h.get_format_date (diaspora));
105 writeln;
106
107 writeln('Corrent Time: ', TimeToStr(Now));
108 writeln;
109
110 for i := Low(Cities) to High(Cities) do
111 begin
112 Long := Cities[i].Longitude;
113 Lat := Cities[i].Latitude;
114 LongLatName := Cities[i].Name;
115
116 Writeln('City: ', LongLatName);
117 Writeln(#9'Latitude: ', FloatToStr(Lat));
118 Writeln(#9'Longitude: ', FloatToStr(Long));
119
120 // print Time using a degree of sunrise/sunset
121 deg := 90;
122 writeln(#9'Degree: ', deg);
123 tmp := h.get_deg_sunrise(Now, Lat, Long, deg);
124 writeln (#9'hour of sunrise: ', MinutesToHours(tmp + time_zone * 60));
125 tmp := h.get_deg_sunset(Now, Lat, Long, deg);
126 writeln(#9'hour of sunset: ', MinutesToHours(tmp + time_zone * 60));
127
128 //print information
129 tmp := h.get_temporary_time(Now, Lat, Long);
130 writeln(#9'Temporary hour length: ', MinutesToHours(tmp));
131 tmp := h.get_first_light(Now, Lat, Long);
132 writeln(#9'first light: ', MinutesToHours(tmp + time_zone * 60));
133 tmp := h.get_prayer_time(Now, Lat, Long);
134 writeln(#9'talit time: ', MinutesToHours(tmp + time_zone * 60));
135 tmp := h.get_time_full_sunrise(Now, Lat, Long);
136 writeln(#9'full sunrise: ', MinutesToHours(tmp + time_zone * 60));
137 tmp := h.get_time_full_midday(Now, Lat, Long);
138 writeln(#9'full midday: ', MinutesToHours(tmp + time_zone * 60));
139 tmp := h.get_time_full_sunset(Now, Lat, Long);
140 writeln(#9'full sunset: ', MinutesToHours(tmp + time_zone * 60));
141 tmp := h.get_time_full_first_stars(Now, Lat, Long);
142 writeln(#9'first stars: ', MinutesToHours(tmp + time_zone * 60));
143 tmp := h.get_time_full_three_stars(Now, Lat, Long);
144 writeln(#9'three stars: ', MinutesToHours(tmp + time_zone * 60));
145 writeln;
146 end;
147 finally
148 h.Free;
149 end;
150 end.
153153 PA_VERSION = @PA_VERSION@
154154 PE_CFLAGS = @PE_CFLAGS@
155155 PE_MODULES_PATH = @PE_MODULES_PATH@
156 PH_CONFIG_PATH = @PH_CONFIG_PATH@
157 PH_MODULES_PATH = @PH_MODULES_PATH@
156158 PKG_CONFIG = @PKG_CONFIG@
157159 POSUB = @POSUB@
158160 PY_CFLAGS = @PY_CFLAGS@
159161 PY_MODULES_PATH = @PY_MODULES_PATH@
160162 PY_VERSION = @PY_VERSION@
161163 RANLIB = @RANLIB@
164 RU_CFLAGS = @RU_CFLAGS@
165 RU_MODULES_PATH = @RU_MODULES_PATH@
166 RU_VERSION = @RU_VERSION@
162167 SED = @SED@
163168 SET_MAKE = @SET_MAKE@
164169 SHELL = @SHELL@
172177 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
173178 WITH_PERL_FALSE = @WITH_PERL_FALSE@
174179 WITH_PERL_TRUE = @WITH_PERL_TRUE@
180 WITH_PHP_FALSE = @WITH_PHP_FALSE@
181 WITH_PHP_TRUE = @WITH_PHP_TRUE@
175182 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
176183 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
184 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
185 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
177186 XGETTEXT = @XGETTEXT@
178187 XGETTEXT_015 = @XGETTEXT_015@
179188 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
202211 exec_prefix = @exec_prefix@
203212 have_pascal = @have_pascal@
204213 have_perl = @have_perl@
214 have_php = @have_php@
215 have_php_config = @have_php_config@
205216 have_python = @have_python@
217 have_ruby = @have_ruby@
206218 have_swig = @have_swig@
207219 host = @host@
208220 host_alias = @host_alias@
66 *
77 * Copyright: 2004 (c) Yaacov Zamir
88 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 * 02111-1307, USA.
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2321 */
2422
2523 #include <stdio.h> /* For printf */
172170 type=\"text/css\" media=\"screen\" href=\"colorful.css\">");
173171 printf ("</style>\n\
174172 <link rel=\"alternate stylesheet\" title=\"Print\" \
175 type=\"text/css\" media=\"all\" href=\"print.css\">");
173 type=\"text/css\" media=\"all\" href=\"print.css\">\n");
176174
177175 printf ("\
178176 <title>Hebrew Calendar</title>\n\
291289 print_calendar (int month, int year, int opt_h, int opt_d)
292290 {
293291 hdate_struct h;
292 hdate_struct today;
294293 int jd;
294 int jd_today;
295295 int i, j;
296296 char type_char[] = { '/', '+', '*', '-' };
297297 int holyday_type;
299299 /* Find day to start calendar with */
300300 hdate_set_gdate (&h, 1, month, year);
301301
302 /* return print head to sunday */
302 /* Set today to today, so we know what day to highlight */
303 hdate_set_gdate (&today, 0, 0, 0);
304 jd_today = today.hd_jd;
305
306 /* Return print head to sunday */
303307 jd = h.hd_jd - h.hd_dw + 1;
304308
305309 /* Loop over all days in this month */
355359 if (h.gd_mon == month)
356360 {
357361 /* Print a day */
358 printf ("%2d%c%3s", h.gd_day,
359 type_char[holyday_type],
360 hdate_get_int_string (h.
361 hd_day));
362 if (jd != jd_today)
363 {
364 printf ("%2d%c%3s", h.gd_day,
365 type_char[holyday_type],
366 hdate_get_int_string (h.
367 hd_day));
368 }
369 else /* It's today, lets print it in bold */
370 {
371 printf ("%c[1m", 27);
372 printf ("%2d%c%3s", h.gd_day,
373 type_char[holyday_type],
374 hdate_get_int_string (h.
375 hd_day));
376 printf ("%c[m", 27);
377 }
362378 }
363379 if (j != 6)
364380 printf ("\t");
55 *
66 * Copyright: 2004 (c) Yaacov Zamir
77 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 * 02111-1307, USA.
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2220 */
2321
2422
Binary diff not shown
66 msgstr ""
77 "Project-Id-Version: es_MX\n"
88 "Report-Msgid-Bugs-To: \n"
9 "POT-Creation-Date: 2008-01-05 10:30+0200\n"
9 "POT-Creation-Date: 2008-01-11 18:45+0200\n"
1010 "PO-Revision-Date: 2005-03-07 12:44+0200\n"
1111 "Last-Translator: Peled Esti <esti@actcom.co.il>\n"
1212 "Language-Team: Spanish\n"
Binary diff not shown
66 msgstr ""
77 "Project-Id-Version: fr\n"
88 "Report-Msgid-Bugs-To: \n"
9 "POT-Creation-Date: 2008-01-05 10:30+0200\n"
9 "POT-Creation-Date: 2008-01-11 18:45+0200\n"
1010 "PO-Revision-Date: 2005-03-07 12:44+0200\n"
1111 "Last-Translator: Yaacov Zamir\n"
1212 "Language-Team: Franch\n"
Binary diff not shown
77 msgstr ""
88 "Project-Id-Version: PACKAGE VERSION\n"
99 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2008-01-05 10:30+0200\n"
10 "POT-Creation-Date: 2008-01-11 18:45+0200\n"
1111 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1212 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313 "Language-Team: LANGUAGE <LL@li.org>\n"
55 #, fuzzy
66 msgid ""
77 msgstr ""
8 "Project-Id-Version: libhdate 1.4.10\n"
8 "Project-Id-Version: libhdate 1.4.11\n"
99 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2008-01-05 10:30+0200\n"
10 "POT-Creation-Date: 2008-01-11 18:45+0200\n"
1111 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1212 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313 "Language-Team: LANGUAGE <LL@li.org>\n"
Binary diff not shown
77 msgstr ""
88 "Project-Id-Version: ru\n"
99 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2008-01-05 10:30+0200\n"
10 "POT-Creation-Date: 2008-01-11 18:45+0200\n"
1111 "PO-Revision-Date: 2005-03-08 22:44-0200\n"
1212 "Last-Translator: Boeis Peterberg\n"
1313 "Language-Team: Russian\n"
Binary diff not shown
66 msgstr ""
77 "Project-Id-Version: libhdate\n"
88 "Report-Msgid-Bugs-To: \n"
9 "POT-Creation-Date: 2008-01-05 10:30+0200\n"
10 "PO-Revision-Date: 2006-03-19 16:53+0100\n"
11 "Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
9 "POT-Creation-Date: 2008-01-11 18:45+0200\n"
10 "PO-Revision-Date: 2008-01-10 10:26+0100\n"
11 "Last-Translator: Patrik Nilsson <blambi@chebab.com>, Daniel Nylander "
12 "<po@danielnylander.se>\n"
1213 "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
1314 "MIME-Version: 1.0\n"
1415 "Content-Type: text/plain; charset=utf-8\n"
348349
349350 #: src/hdate_strings.c:273 src/hdate_strings.c:310
350351 msgid "Family Day"
351 msgstr ""
352 msgstr "Familjedagen"
352353
353354 #: src/hdate_strings.c:274 src/hdate_strings.c:311
354355 msgid "Memorial day for fallen whose place of burial is unknown"
355 msgstr ""
356 msgstr "Minnesdag för de fallena vars gravplats är okänd"
356357
357358 #: src/hdate_strings.c:275
358359 msgid "Rabin memorial day"
359 msgstr ""
360 msgstr "Minnesdag för Y. Rabin"
360361
361362 #: src/hdate_strings.c:276
362363 msgid "Zhabotinsky day"
363 msgstr ""
364 msgstr "Zhabotinksys dag"
364365
365366 #: src/hdate_strings.c:312
366367 msgid "Yitzhak Rabin memorial day"
367 msgstr ""
368 msgstr "Minnesdag för Yitzhak Rabin"
368369
369370 #: src/hdate_strings.c:313
370371 msgid "Zeev Zhabotinsky day"
371 msgstr ""
372 msgstr "Zeev Zhabotinksys dag"
372373
373374 #: src/hdate_strings.c:346 src/hdate_strings.c:409
374375 msgid "none"
620621
621622 #: src/hdate_strings.c:568 src/hdate_strings.c:572
622623 msgid "translator"
623 msgstr "Daniel Nylander"
624 msgstr "Daniel Nylander, Patrik Nilsson"
151151 PA_VERSION = @PA_VERSION@
152152 PE_CFLAGS = @PE_CFLAGS@
153153 PE_MODULES_PATH = @PE_MODULES_PATH@
154 PH_CONFIG_PATH = @PH_CONFIG_PATH@
155 PH_MODULES_PATH = @PH_MODULES_PATH@
154156 PKG_CONFIG = @PKG_CONFIG@
155157 POSUB = @POSUB@
156158 PY_CFLAGS = @PY_CFLAGS@
157159 PY_MODULES_PATH = @PY_MODULES_PATH@
158160 PY_VERSION = @PY_VERSION@
159161 RANLIB = @RANLIB@
162 RU_CFLAGS = @RU_CFLAGS@
163 RU_MODULES_PATH = @RU_MODULES_PATH@
164 RU_VERSION = @RU_VERSION@
160165 SED = @SED@
161166 SET_MAKE = @SET_MAKE@
162167 SHELL = @SHELL@
170175 WITH_PASCAL_TRUE = @WITH_PASCAL_TRUE@
171176 WITH_PERL_FALSE = @WITH_PERL_FALSE@
172177 WITH_PERL_TRUE = @WITH_PERL_TRUE@
178 WITH_PHP_FALSE = @WITH_PHP_FALSE@
179 WITH_PHP_TRUE = @WITH_PHP_TRUE@
173180 WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
174181 WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
182 WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
183 WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
175184 XGETTEXT = @XGETTEXT@
176185 XGETTEXT_015 = @XGETTEXT_015@
177186 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
200209 exec_prefix = @exec_prefix@
201210 have_pascal = @have_pascal@
202211 have_perl = @have_perl@
212 have_php = @have_php@
213 have_php_config = @have_php_config@
203214 have_python = @have_python@
215 have_ruby = @have_ruby@
204216 have_swig = @have_swig@
205217 host = @host@
206218 host_alias = @host_alias@
1414 * You should have received a copy of the GNU General Public License
1515 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1616 */
17
17
18 /** @file hdate.h
19 @brief libhdate C language header.
20
21 libhdate - Hebrew calendar library, the C language header file.
22 */
23
1824 #ifndef __HDATE_H__
1925 #define __HDATE_H__
2026
4349 */
4450 #define HDATE_LONG_FLAG 0
4551
46 /** Base structore for hebrew dates
47
52 /** @struct hdate_struct
53 @brief libhdate Hebrew date struct
4854 */
4955 typedef struct
5056 {
336342
337343 /**
338344 @brief utc sun times for altitude at a gregorian date
339
340 @parm day this day of month
341 @parm month this month
342 @parm year this year
343 @parm longitude longitude to use in calculations
344 @parm latitude latitude to use in calculations
345 @parm deg degrees of sun's altitude (0 - Zenith .. 90 - Horizon)
346 @parm sunrise return the utc sunrise in minutes
347 @parm sunset return the utc sunset in minutes
345
346 Returns the sunset and sunrise times in minutes from 00:00 (utc time)
347 if sun altitude in sunrise is deg degries.
348 This function only works for altitudes sun realy is.
349 If the sun never get to this altitude, the returned sunset and sunrise values
350 will be negative. This can happen in low altitude when latitude is
351 nearing the pols in winter times, the sun never goes very high in
352 the sky there.
353
354 @param day this day of month
355 @param month this month
356 @param year this year
357 @param longitude longitude to use in calculations
358 @param latitude latitude to use in calculations
359 @param deg degrees of sun's altitude (0 - Zenith .. 90 - Horizon)
360 @param sunrise return the utc sunrise in minutes
361 @param sunset return the utc sunset in minutes
348362 */
349363 void
350364 hdate_get_utc_sun_time_deg (int day, int month, int year,
358372 @param year this year
359373 @param longitude longitude to use in calculations
360374 degrees, negative values are east
361 @param latitude latitude to use in calculations
375 @param latitude latitude to use in calculations
362376 degrees, negative values are south
363377 @param sunrise return the utc sunrise in minutes after midnight (00:00)
364378 @param sunset return the utc sunset in minutes after midnight (00:00)
370384 /**
371385 @brief utc sunrise/set time for a gregorian date
372386
373 @parm day this day of month
374 @parm month this month
375 @parm year this year
376 @parm longitude longitude to use in calculations
377 @parm latitude latitude to use in calculations
378 @parm sun_hour return the length of shaa zaminit in minutes
379 @parm first_light return the utc alut ha-shachar in minutes
380 @parm talit return the utc tphilin and talit in minutes
381 @parm sunrise return the utc sunrise in minutes
382 @parm midday return the utc midday in minutes
383 @parm sunset return the utc sunset in minutes
384 @parm first_stars return the utc tzeit hacochavim in minutes
385 @parm three_stars return the utc shlosha cochavim in minutes
387 @param day this day of month
388 @param month this month
389 @param year this year
390 @param longitude longitude to use in calculations
391 @param latitude latitude to use in calculations
392 @param sun_hour return the length of shaa zaminit in minutes
393 @param first_light return the utc alut ha-shachar in minutes
394 @param talit return the utc tphilin and talit in minutes
395 @param sunrise return the utc sunrise in minutes
396 @param midday return the utc midday in minutes
397 @param sunset return the utc sunset in minutes
398 @param first_stars return the utc tzeit hacochavim in minutes
399 @param three_stars return the utc shlosha cochavim in minutes
386400 */
387401 void
388402 hdate_get_utc_sun_time_full (int day, int month, int year, double latitude, double longitude,
2424 #include <time.h>
2525 #include <stdio.h>
2626 #include <math.h>
27 #include <errno.h>
2728
2829 #include "hdate.h"
2930 #include "support.h"
5556
5657 /**
5758 @brief utc sun times for altitude at a gregorian date
58
59 @parm day this day of month
60 @parm month this month
61 @parm year this year
62 @parm longitude longitude to use in calculations
63 @parm latitude latitude to use in calculations
64 @parm deg degrees of sun's altitude (0 - Zenith .. 90 - Horizon)
65 @parm sunrise return the utc sunrise in minutes
66 @parm sunset return the utc sunset in minutes
59
60 Returns the sunset and sunrise times in minutes from 00:00 (utc time)
61 if sun altitude in sunrise is deg degries.
62 This function only works for altitudes sun realy is.
63 If the sun never get to this altitude, the returned sunset and sunrise values
64 will be negative. This can happen in low altitude when latitude is
65 nearing the pols in winter times, the sun never goes very high in
66 the sky there.
67
68 @param day this day of month
69 @param month this month
70 @param year this year
71 @param longitude longitude to use in calculations
72 @param latitude latitude to use in calculations
73 @param deg degrees of sun's altitude (0 - Zenith .. 90 - Horizon)
74 @param sunrise return the utc sunrise in minutes
75 @param sunset return the utc sunset in minutes
6776 */
6877 void
6978 hdate_get_utc_sun_time_deg (int day, int month, int year, double latitude, double longitude, double deg, int *sunrise, int *sunset)
96105 latitude = M_PI * latitude / 180.0;
97106
98107 /* the sun real time diff from noon at sunset/rise in radians */
108 errno = 0;
99109 ha = acos (cos (sunrise_angle) / (cos (latitude) * cos (decl)) - tan (latitude) * tan (decl));
100110
111 /* check for too high altitudes and return negative values */
112 if (errno == EDOM)
113 {
114 *sunrise = -720;
115 *sunset = -720;
116
117 return;
118 }
119
101120 /* we use minutes, ratio is 1440min/2pi */
102121 ha = 720.0 * ha / M_PI;
103122
1414 * You should have received a copy of the GNU General Public License
1515 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1616 */
17
17
18 /** @file hdatepp.h
19 @brief libhdate C++ language header.
20
21 libhdate - Hebrew calendar library, the C++ language header file.
22 */
23
1824 #ifndef __HDATE_PP_H__
1925 #define __HDATE_PP_H__
2026