Codebase list libhdate / run/841342d9-316d-4f55-a179-9e154046f3ac/main docs / man / man3 / hdate.h.3
run/841342d9-316d-4f55-a179-9e154046f3ac/main

Tree @run/841342d9-316d-4f55-a179-9e154046f3ac/main (Download .tar.gz)

hdate.h.3 @run/841342d9-316d-4f55-a179-9e154046f3ac/mainraw · history · blame

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
.TH "src/hdate.h" 3 "Sun Jan 8 2012" "Version 1.4" "libhdate C language" \" -*- nroff -*-
.ad l
.nh
.SH NAME
src/hdate.h \- 
.PP
libhdate C language header\&.  

.SH SYNOPSIS
.br
.PP
.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBhdate_struct\fP"
.br
.RI "\fIlibhdate Hebrew date struct \fP"
.in -1c
.SS "Defines"

.in +1c
.ti -1c
.RI "#define \fBHDATE_DIASPORA_FLAG\fP   -1"
.br
.RI "\fIuse diaspora dates and holydays flag \fP"
.ti -1c
.RI "#define \fBHDATE_ISRAEL_FLAG\fP   0"
.br
.RI "\fIuse israel dates and holydays flag \fP"
.ti -1c
.RI "#define \fBHDATE_SHORT_FLAG\fP   -1"
.br
.RI "\fIuse short strings flag \fP"
.ti -1c
.RI "#define \fBHDATE_LONG_FLAG\fP   0"
.br
.RI "\fIuse long strings flag \fP"
.ti -1c
.RI "#define \fBHEBREW_NUMBER_BUFFER_SIZE\fP   17"
.br
.RI "\fIfor hdate_get_int_string_ and hdate_get_int_wstring \fP"
.ti -1c
.RI "#define \fBHEBREW_WNUMBER_BUFFER_SIZE\fP   9"
.br
.ti -1c
.RI "#define \fBHDATE_STRING_INT\fP   0"
.br
.RI "\fIfor function hdate_string: identifies string type: integer \fP"
.ti -1c
.RI "#define \fBHDATE_STRING_DOW\fP   1"
.br
.RI "\fIfor function hdate_string: identifies string type: day of week \fP"
.ti -1c
.RI "#define \fBHDATE_STRING_PARASHA\fP   2"
.br
.RI "\fIfor function hdate_string: identifies string type: parasha \fP"
.ti -1c
.RI "#define \fBHDATE_STRING_HMONTH\fP   3"
.br
.RI "\fIfor function hdate_string: identifies string type: hebrew_month \fP"
.ti -1c
.RI "#define \fBHDATE_STRING_GMONTH\fP   4"
.br
.RI "\fIfor function hdate_string: identifies string type: gregorian_month \fP"
.ti -1c
.RI "#define \fBHDATE_STRING_HOLIDAY\fP   5"
.br
.RI "\fIfor function hdate_string: identifies string type: holiday \fP"
.ti -1c
.RI "#define \fBHDATE_STRING_OMER\fP   6"
.br
.ti -1c
.RI "#define \fBHDATE_STRING_SHORT\fP   1"
.br
.RI "\fIfor function hdate_string: use short form, if one exists \fP"
.ti -1c
.RI "#define \fBHDATE_STRING_LONG\fP   0"
.br
.RI "\fIfor function hdate_string: use long form \fP"
.ti -1c
.RI "#define \fBHDATE_STRING_HEBREW\fP   1"
.br
.RI "\fIfor function hdate_string: use embedded hebrew string \fP"
.ti -1c
.RI "#define \fBHDATE_STRING_LOCAL\fP   0"
.br
.RI "\fIfor function hdate_string: use local locale string \fP"
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBhdate_struct\fP * \fBhdate_set_gdate\fP (\fBhdate_struct\fP *h, int d, int m, int y)"
.br
.RI "\fIcompute date structure from the Gregorian date \fP"
.ti -1c
.RI "\fBhdate_struct\fP * \fBhdate_set_hdate\fP (\fBhdate_struct\fP *h, int d, int m, int y)"
.br
.RI "\fIcompute date structure from the Hebrew date \fP"
.ti -1c
.RI "\fBhdate_struct\fP * \fBhdate_set_jd\fP (\fBhdate_struct\fP *h, int jd)"
.br
.RI "\fIcompute date structure from the Julian day \fP"
.ti -1c
.RI "char * \fBhdate_get_format_date\fP (\fBhdate_struct\fP const *h, int diaspora, int s)"
.br
.RI "\fIReturn a string, with the hebrew date\&. \fP"
.ti -1c
.RI "int \fBhdate_get_parasha\fP (\fBhdate_struct\fP const *h, int diaspora)"
.br
.RI "\fIget the number of hebrew parasha\&. \fP"
.ti -1c
.RI "int \fBhdate_get_holyday\fP (\fBhdate_struct\fP const *h, int diaspora)"
.br
.RI "\fIget the number of hebrew holiday\&. \fP"
.ti -1c
.RI "char * \fBhdate_get_int_string\fP (int n)"
.br
.RI "\fIconvert an integer to hebrew string\&. \fP"
.ti -1c
.RI "char * \fBhdate_get_day_string\fP (int day, int s)"
.br
.RI "\fIReturn a static string, with name of week day\&. \fP"
.ti -1c
.RI "char * \fBhdate_get_month_string\fP (int month, int s)"
.br
.RI "\fIReturn a static string, with name of month\&. \fP"
.ti -1c
.RI "char * \fBhdate_get_hebrew_month_string\fP (int month, int s)"
.br
.RI "\fIReturn a static string, with name of hebrew month\&. \fP"
.ti -1c
.RI "char * \fBhdate_get_holyday_string\fP (int holyday, int s)"
.br
.RI "\fIName of hebrew holiday\&. \fP"
.ti -1c
.RI "char * \fBhdate_get_parasha_string\fP (int parasha, int s)"
.br
.RI "\fIName of Parasha\&. \fP"
.ti -1c
.RI "char * \fBhdate_get_omer_string\fP (int omer_day)"
.br
.RI "\fIReturn a static string, with the day in the omer\&. \fP"
.ti -1c
.RI "int \fBhdate_get_omer_day\fP (\fBhdate_struct\fP const *h)"
.br
.RI "\fIReturn the day in the omer of the given date\&. \fP"
.ti -1c
.RI "int \fBhdate_get_holyday_type\fP (int holyday)"
.br
.RI "\fIReturn number of hebrew holyday type\&. \fP"
.ti -1c
.RI "int \fBhdate_get_size_of_hebrew_year\fP (int hebrew_year)"
.br
.RI "\fIsize of hebrew year in days\&. \fP"
.ti -1c
.RI "int \fBhdate_days_from_3744\fP (int hebrew_year)"
.br
.RI "\fIDays since Tishrey 3744\&. \fP"
.ti -1c
.RI "int \fBhdate_get_year_type\fP (int size_of_year, int new_year_dw)"
.br
.RI "\fIReturn Hebrew year type based on size and first week day of year\&. \fP"
.ti -1c
.RI "int \fBhdate_gdate_to_jd\fP (int day, int month, int year)"
.br
.RI "\fICompute Julian day from Gregorian date\&. \fP"
.ti -1c
.RI "int \fBhdate_hdate_to_jd\fP (int day, int month, int year, int *jd_tishrey1, int *jd_tishrey1_next_year)"
.br
.RI "\fICompute Julian day from Hebrew day, month and year\&. \fP"
.ti -1c
.RI "void \fBhdate_jd_to_gdate\fP (int jd, int *day, int *month, int *year)"
.br
.RI "\fIConverting from the Julian day to the Gregorian date\&. \fP"
.ti -1c
.RI "void \fBhdate_jd_to_hdate\fP (int jd, int *day, int *month, int *year, int *jd_tishrey1, int *jd_tishrey1_next_year)"
.br
.RI "\fIConverting from the Julian day to the Hebrew day\&. \fP"
.ti -1c
.RI "int \fBhdate_get_day_of_year\fP (int day, int month, int year)"
.br
.RI "\fIdays from 1 january \fP"
.ti -1c
.RI "void \fBhdate_get_utc_sun_time_deg\fP (int day, int month, int year, double latitude, double longitude, double deg, int *sunrise, int *sunset)"
.br
.RI "\fIutc sun times for altitude at a gregorian date \fP"
.ti -1c
.RI "void \fBhdate_get_utc_sun_time\fP (int day, int month, int year, double latitude, double longitude, int *sunrise, int *sunset)"
.br
.RI "\fIutc sunrise/set time for a gregorian date \fP"
.ti -1c
.RI "void \fBhdate_get_utc_sun_time_full\fP (int day, int month, int year, double latitude, double longitude, int *sun_hour, int *first_light, int *talit, int *sunrise, int *midday, int *sunset, int *first_stars, int *three_stars)"
.br
.RI "\fIutc sunrise/set time for a gregorian date \fP"
.ti -1c
.RI "int \fBhdate_get_gday\fP (\fBhdate_struct\fP const *h)"
.br
.RI "\fIget the Gregorian day of the month \fP"
.ti -1c
.RI "int \fBhdate_get_gmonth\fP (\fBhdate_struct\fP const *h)"
.br
.RI "\fIget the Gregorian month \fP"
.ti -1c
.RI "int \fBhdate_get_gyear\fP (\fBhdate_struct\fP const *h)"
.br
.RI "\fIget the Gregorian year \fP"
.ti -1c
.RI "int \fBhdate_get_hday\fP (\fBhdate_struct\fP const *h)"
.br
.RI "\fIget the Hebrew day of the month \fP"
.ti -1c
.RI "int \fBhdate_get_hmonth\fP (\fBhdate_struct\fP const *h)"
.br
.RI "\fIget the Hebrew month \fP"
.ti -1c
.RI "int \fBhdate_get_hyear\fP (\fBhdate_struct\fP const *h)"
.br
.RI "\fIget the Hebrew year \fP"
.ti -1c
.RI "int \fBhdate_get_day_of_the_week\fP (\fBhdate_struct\fP const *h)"
.br
.RI "\fIget the day of the week \fP"
.ti -1c
.RI "int \fBhdate_get_size_of_year\fP (\fBhdate_struct\fP const *h)"
.br
.RI "\fIget the size of the hebrew year \fP"
.ti -1c
.RI "int \fBhdate_get_new_year_day_of_the_week\fP (\fBhdate_struct\fP const *h)"
.br
.RI "\fIget the new year day of the week \fP"
.ti -1c
.RI "int \fBhdate_get_julian\fP (\fBhdate_struct\fP const *h)"
.br
.RI "\fIget the Julian day number \fP"
.ti -1c
.RI "int \fBhdate_get_days\fP (\fBhdate_struct\fP const *h)"
.br
.RI "\fIget the number of days passed since 1 tishrey \fP"
.ti -1c
.RI "int \fBhdate_get_weeks\fP (\fBhdate_struct\fP const *h)"
.br
.RI "\fIget the number of weeks passed since 1 tishrey \fP"
.ti -1c
.RI "\fBhdate_struct\fP * \fBnew_hdate\fP ()"
.br
.RI "\fIcreat a new hdate struct object, must be deleted using delete_hdate\&. \fP"
.ti -1c
.RI "\fBhdate_struct\fP * \fBdelete_hdate\fP (\fBhdate_struct\fP *h)"
.br
.RI "\fIdelete an hdate struct object\&. \fP"
.ti -1c
.RI "char * \fBhdate_get_version_string\fP ()"
.br
.RI "\fIReturn a static string, with the package name and version\&. \fP"
.ti -1c
.RI "char * \fBhdate_get_translator_string\fP ()"
.br
.RI "\fIname of translator \fP"
.ti -1c
.RI "int \fBhdate_is_hebrew_locale\fP ()"
.br
.RI "\fIhelper function to find hebrew locale \fP"
.ti -1c
.RI "char * \fBhdate_string\fP (int type_of_string, int index, int short_form, int hebrew_form)"
.br
.RI "\fIReturn string values for hdate information\&. \fP"
.in -1c
.SH "Detailed Description"
.PP 
libhdate C language header\&. 

libhdate - Hebrew calendar library, the C language header file\&. 
.SH "Define Documentation"
.PP 
.SS "#define \fBHDATE_DIASPORA_FLAG\fP   -1"
.PP
use diaspora dates and holydays flag 
.SS "#define \fBHDATE_ISRAEL_FLAG\fP   0"
.PP
use israel dates and holydays flag 
.SS "#define \fBHDATE_SHORT_FLAG\fP   -1"
.PP
use short strings flag 
.SS "#define \fBHDATE_LONG_FLAG\fP   0"
.PP
use long strings flag 
.SS "#define \fBHEBREW_NUMBER_BUFFER_SIZE\fP   17"
.PP
for hdate_get_int_string_ and hdate_get_int_wstring \fBNote:\fP
.RS 4
How large should the buffer be? Hebrew year 10,999 would be י'תתקצ"ט, eight characters, each two bytes, plus an end-of-string delimiter, equals 17\&. This could effectively yield a range extending to Hebrew year 11,899, י'א תתצ'ט, due to the extra ק needed for the '900' century\&. However, for readability, I would want a an extra space at that point between the millenium and the century\&.\&.\&. 
.RE
.PP

.SS "#define \fBHEBREW_WNUMBER_BUFFER_SIZE\fP   9"
.SS "#define \fBHDATE_STRING_INT\fP   0"
.PP
for function hdate_string: identifies string type: integer 
.SS "#define \fBHDATE_STRING_DOW\fP   1"
.PP
for function hdate_string: identifies string type: day of week 
.SS "#define \fBHDATE_STRING_PARASHA\fP   2"
.PP
for function hdate_string: identifies string type: parasha 
.SS "#define \fBHDATE_STRING_HMONTH\fP   3"
.PP
for function hdate_string: identifies string type: hebrew_month 
.SS "#define \fBHDATE_STRING_GMONTH\fP   4"
.PP
for function hdate_string: identifies string type: gregorian_month 
.SS "#define \fBHDATE_STRING_HOLIDAY\fP   5"
.PP
for function hdate_string: identifies string type: holiday 
.SS "#define \fBHDATE_STRING_OMER\fP   6"
.SS "#define \fBHDATE_STRING_SHORT\fP   1"
.PP
for function hdate_string: use short form, if one exists 
.SS "#define \fBHDATE_STRING_LONG\fP   0"
.PP
for function hdate_string: use long form 
.SS "#define \fBHDATE_STRING_HEBREW\fP   1"
.PP
for function hdate_string: use embedded hebrew string 
.SS "#define \fBHDATE_STRING_LOCAL\fP   0"
.PP
for function hdate_string: use local locale string 
.SH "Function Documentation"
.PP 
.SS "\fBhdate_struct\fP* \fBhdate_set_gdate\fP (\fBhdate_struct\fP *h, intd, intm, inty)"
.PP
compute date structure from the Gregorian date \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.br
\fId\fP Day of month 1\&.\&.31 
.br
\fIm\fP Month 1\&.\&.12 if m or d is 0 return current date\&. 
.br
\fIy\fP Year in 4 digits e\&.g\&. 2001 
.RE
.PP
\fBReturns:\fP
.RS 4
pointer to this hdate struct 
.RE
.PP

.SS "\fBhdate_struct\fP* \fBhdate_set_hdate\fP (\fBhdate_struct\fP *h, intd, intm, inty)"
.PP
compute date structure from the Hebrew date \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.br
\fId\fP Day of month 1\&.\&.31 
.br
\fIm\fP Month 1\&.\&.14 ,(13 - Adar 1, 14 - Adar 2) if m or d is 0 return current date\&. 
.br
\fIy\fP Year in 4 digits e\&.g\&. 5731 
.RE
.PP
\fBReturns:\fP
.RS 4
pointer to this hdate struct 
.RE
.PP

.SS "\fBhdate_struct\fP* \fBhdate_set_jd\fP (\fBhdate_struct\fP *h, intjd)"
.PP
compute date structure from the Julian day \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.br
\fIjd\fP the julian day number\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
pointer to this hdate struct 
.RE
.PP

.SS "char* \fBhdate_get_format_date\fP (\fBhdate_struct\fP const *h, intdiaspora, ints)"
.PP
Return a string, with the hebrew date\&. \fBReturns:\fP
.RS 4
NULL pointer upon failure or, upon success, a pointer to a string containing the short ( e\&.g\&. '1 Tishrey' ) or long (e\&.g\&. 'Tuesday
 18 Tishrey 5763 Hol hamoed Sukot' ) formated date\&. You must free() the pointer after use\&.
.RE
.PP
\fBParameters:\fP
.RS 4
\fIh\fP The \fBhdate_struct\fP of the date to print\&. 
.br
\fIdiaspora\fP if true give diaspora holydays 
.br
\fIshort_format\fP A short flag (true - returns a short string, false returns a long string)\&.
.RE
.PP
\fBWarning:\fP
.RS 4
This was originally written using a local static string, calling for output to be copied away\&. 
.RE
.PP

.SS "int \fBhdate_get_parasha\fP (\fBhdate_struct\fP const *h, intdiaspora)"
.PP
get the number of hebrew parasha\&. \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.br
\fIdiaspora\fP if true give diaspora readings 
.RE
.PP
\fBReturns:\fP
.RS 4
the number of parasha 1\&. Bereshit etc\&.\&. (55 through 61 are joined strings e\&.g\&. Vayakhel Pekudei) 
.RE
.PP

.SS "int \fBhdate_get_holyday\fP (\fBhdate_struct\fP const *h, intdiaspora)"
.PP
get the number of hebrew holiday\&. \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.br
\fIdiaspora\fP if true give diaspora holidays 
.RE
.PP
\fBReturns:\fP
.RS 4
the number of holiday\&. 
.RE
.PP

.SS "char* \fBhdate_get_int_string\fP (intn)"
.PP
convert an integer to hebrew string\&. \fBParameters:\fP
.RS 4
\fIn\fP The int to convert ( 0 < n < 11000) 
.RE
.PP
\fBReturns:\fP
.RS 4
a string of the hebrew number UTF-8 (logical) 
.RE
.PP
\fBWarning:\fP
.RS 4
DEPRECATION: This function is now just a wrapper for hdate_string, and is subject to deprecation\&. Callers to this function must free() after using the memory pointed to by the return value\&. The original function outputted to a local static string, and suggested that the caller copied it away\&. [deprecation date 2011-12-28] 
.RE
.PP

.SS "char* \fBhdate_get_day_string\fP (intday, ints)"
.PP
Return a static string, with name of week day\&. \fBParameters:\fP
.RS 4
\fIday_of_week\fP The number of the day 1\&.\&.7 (1 - sun)\&. 
.br
\fIshort_form\fP A short flag (true - sun; false - sunday)\&. 
.RE
.PP
\fBWarning:\fP
.RS 4
DEPRECATION: This function is now just a wrapper for hdate_string, and is subject to deprecation\&. [deprecation date 2011-12-28] 
.RE
.PP

.SS "char* \fBhdate_get_month_string\fP (intmonth, ints)"
.PP
Return a static string, with name of month\&. \fBParameters:\fP
.RS 4
\fImonth\fP The number of the month 1\&.\&.12 (1 - jan)\&. 
.br
\fIshort_form\fP A short flag\&. 
.RE
.PP
\fBWarning:\fP
.RS 4
DEPRECATION: This function is now just a wrapper for hdate_string, and is subject to deprecation\&. [deprecation date 2011-12-28] 
.RE
.PP

.SS "char* \fBhdate_get_hebrew_month_string\fP (intmonth, ints)"
.PP
Return a static string, with name of hebrew month\&. \fBParameters:\fP
.RS 4
\fImonth\fP The number of the month 1\&.\&.14 (1 - tishre, 13 - adar 1, 14 - adar 2)\&. 
.br
\fIshort_form\fP A short flag\&. 
.RE
.PP
\fBWarning:\fP
.RS 4
DEPRECATION: This function is now just a wrapper for hdate_string, and is subject to deprecation\&. [deprecation date 2011-12-28] 
.RE
.PP

.SS "char* \fBhdate_get_holyday_string\fP (intholyday, ints)"
.PP
Name of hebrew holiday\&. \fBParameters:\fP
.RS 4
\fIholiday\fP The holiday number\&. 
.br
\fIshort_text\fP A short flag\&. 0=true, !0=false 
.RE
.PP
\fBWarning:\fP
.RS 4
DEPRECATION: This function is now just a wrapper for hdate_string, and is subject to deprecation\&. [deprecation date 2011-12-28] 
.RE
.PP

.SS "char* \fBhdate_get_parasha_string\fP (intparasha, ints)"
.PP
Name of Parasha\&. \fBParameters:\fP
.RS 4
\fIparasha\fP The Number of Parasha 1-Bereshit (55 through 61 are joined strings e\&.g\&. Vayakhel Pekudei) 
.br
\fIshort_form\fP A short flag\&. 0=true, !0 = false 
.RE
.PP
\fBWarning:\fP
.RS 4
DEPRECATION: This function is now just a wrapper for hdate_string, and is subject to deprecation\&. [deprecation date 2011-12-28] 
.RE
.PP

.SS "char* \fBhdate_get_omer_string\fP (intomer_day)"
.PP
Return a static string, with the day in the omer\&. \fBParameters:\fP
.RS 4
\fIomer\fP day The day in the omer\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
a pointer to a string with the day in the omer\&. The caller must free() the pointer after use\&. 
.RE
.PP
\fBWarning:\fP
.RS 4
DEPRECATION: This function is now just a wrapper for hdate_string, and is subject to deprecation\&. 
.RE
.PP
\fBAttention:\fP
.RS 4
The prior version of this function returned a pointer to a static string buffer\&. The current version returns a pointer to a malloc()ed buffer and needs to be free()d after use\&. [deprecation date 2011-12-28] 
.RE
.PP

.SS "int \fBhdate_get_omer_day\fP (\fBhdate_struct\fP const *h)"
.PP
Return the day in the omer of the given date\&. \fBParameters:\fP
.RS 4
\fIh\fP The \fBhdate_struct\fP of the date to use\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
The day in the omer, starting from 1 (or 0 if not in sfirat ha omer) 
.RE
.PP

.SS "int \fBhdate_get_holyday_type\fP (intholyday)"
.PP
Return number of hebrew holyday type\&. Holiday types: 0 - Regular day 1 - Yom tov (plus yom kippor) 2 - Erev yom kippur 3 - Hol hamoed 4 - Hanuka and purim 5 - Tzomot 6 - Independance day and Yom yerushalaim 7 - Lag baomer ,Tu beav, Tu beshvat 8 - Tzahal and Holocaust memorial days 9 - National days
.PP
\fBParameters:\fP
.RS 4
\fIholyday\fP the holyday number 
.RE
.PP
\fBReturns:\fP
.RS 4
the number of holyday type\&. 
.RE
.PP

.SS "int \fBhdate_get_size_of_hebrew_year\fP (inthebrew_year)"
.PP
size of hebrew year in days\&. \fBParameters:\fP
.RS 4
\fIhebrew_year\fP the hebrew year\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
size of Hebrew year 
.RE
.PP

.SS "int \fBhdate_days_from_3744\fP (inthebrew_year)"
.PP
Days since Tishrey 3744\&. \fBAuthor:\fP
.RS 4
Amos Shapir 1984 (rev\&. 1985, 1992) Yaacov Zamir 2003-2005
.RE
.PP
\fBParameters:\fP
.RS 4
\fIhebrew_year\fP The Hebrew year 
.RE
.PP
\fBReturns:\fP
.RS 4
Number of days since 3,1,3744 
.RE
.PP

.SS "int \fBhdate_get_year_type\fP (intsize_of_year, intnew_year_dw)"
.PP
Return Hebrew year type based on size and first week day of year\&. \fBParameters:\fP
.RS 4
\fIsize_of_year\fP Length of year in days 
.br
\fInew_year_dw\fP First week day of year 
.RE
.PP
\fBReturns:\fP
.RS 4
the number for year type (1\&.\&.14) 
.RE
.PP

.SS "int \fBhdate_gdate_to_jd\fP (intday, intmonth, intyear)"
.PP
Compute Julian day from Gregorian date\&. \fBAuthor:\fP
.RS 4
Yaacov Zamir (algorithm from Henry F\&. Fliegel and Thomas C\&. Van Flandern ,1968)
.RE
.PP
\fBParameters:\fP
.RS 4
\fIday\fP Day of month 1\&.\&.31 
.br
\fImonth\fP Month 1\&.\&.12 
.br
\fIyear\fP Year in 4 digits e\&.g\&. 2001 
.RE
.PP
\fBReturns:\fP
.RS 4
the julian day number 
.RE
.PP

.SS "int \fBhdate_hdate_to_jd\fP (intday, intmonth, intyear, int *jd_tishrey1, int *jd_tishrey1_next_year)"
.PP
Compute Julian day from Hebrew day, month and year\&. \fBAuthor:\fP
.RS 4
Amos Shapir 1984 (rev\&. 1985, 1992) Yaacov Zamir 2003-2005
.RE
.PP
\fBParameters:\fP
.RS 4
\fIday\fP Day of month 1\&.\&.31 
.br
\fImonth\fP Month 1\&.\&.14 (13 - Adar 1, 14 - Adar 2) 
.br
\fIyear\fP Hebrew year in 4 digits e\&.g\&. 5753 
.br
\fIjd_tishrey1\fP return the julian number of 1 Tishrey this year 
.br
\fIjd_tishrey1_next_year\fP return the julian number of 1 Tishrey next year 
.RE
.PP
\fBReturns:\fP
.RS 4
the julian day number 
.RE
.PP

.SS "void \fBhdate_jd_to_gdate\fP (intjd, int *day, int *month, int *year)"
.PP
Converting from the Julian day to the Gregorian date\&. \fBAuthor:\fP
.RS 4
Yaacov Zamir (Algorithm, Henry F\&. Fliegel and Thomas C\&. Van Flandern ,1968)
.RE
.PP
\fBParameters:\fP
.RS 4
\fIjd\fP Julian day 
.br
\fIday\fP return Day of month 1\&.\&.31 
.br
\fImonth\fP return Month 1\&.\&.12 
.br
\fIyear\fP return Year in 4 digits e\&.g\&. 2001 
.RE
.PP

.SS "void \fBhdate_jd_to_hdate\fP (intjd, int *day, int *month, int *year, int *jd_tishrey1, int *jd_tishrey1_next_year)"
.PP
Converting from the Julian day to the Hebrew day\&. \fBAuthor:\fP
.RS 4
Yaacov Zamir 2005
.RE
.PP
\fBParameters:\fP
.RS 4
\fIjd\fP Julian day 
.br
\fIday\fP return Day of month 1\&.\&.31 
.br
\fImonth\fP return Month 1\&.\&.14 (13 - Adar 1, 14 - Adar 2) 
.br
\fIyear\fP return Year in 4 digits e\&.g\&. 2001 
.br
\fIjd_tishrey1\fP return the julian number of 1 Tishrey this year 
.br
\fIjd_tishrey1_next_year\fP return the julian number of 1 Tishrey next year 
.RE
.PP

.SS "int \fBhdate_get_day_of_year\fP (intday, intmonth, intyear)"
.PP
days from 1 january \fBParameters:\fP
.RS 4
\fIday\fP this day of month 
.br
\fImonth\fP this month 
.br
\fIyear\fP this year 
.RE
.PP
\fBReturns:\fP
.RS 4
the days from 1 jan 
.RE
.PP

.SS "void \fBhdate_get_utc_sun_time_deg\fP (intday, intmonth, intyear, doublelatitude, doublelongitude, doubledeg, int *sunrise, int *sunset)"
.PP
utc sun times for altitude at a gregorian date 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\&.
.PP
\fBParameters:\fP
.RS 4
\fIday\fP this day of month 
.br
\fImonth\fP this month 
.br
\fIyear\fP this year 
.br
\fIlongitude\fP longitude to use in calculations 
.br
\fIlatitude\fP latitude to use in calculations 
.br
\fIdeg\fP degrees of sun's altitude (0 - Zenith \&.\&. 90 - Horizon) 
.br
\fIsunrise\fP return the utc sunrise in minutes 
.br
\fIsunset\fP return the utc sunset in minutes 
.RE
.PP

.SS "void \fBhdate_get_utc_sun_time\fP (intday, intmonth, intyear, doublelatitude, doublelongitude, int *sunrise, int *sunset)"
.PP
utc sunrise/set time for a gregorian date \fBParameters:\fP
.RS 4
\fIday\fP this day of month 
.br
\fImonth\fP this month 
.br
\fIyear\fP this year 
.br
\fIlongitude\fP longitude to use in calculations degrees, negative values are east 
.br
\fIlatitude\fP latitude to use in calculations degrees, negative values are south 
.br
\fIsunrise\fP return the utc sunrise in minutes after midnight (00:00) 
.br
\fIsunset\fP return the utc sunset in minutes after midnight (00:00) 
.RE
.PP

.SS "void \fBhdate_get_utc_sun_time_full\fP (intday, intmonth, intyear, doublelatitude, doublelongitude, int *sun_hour, int *first_light, int *talit, int *sunrise, int *midday, int *sunset, int *first_stars, int *three_stars)"
.PP
utc sunrise/set time for a gregorian date \fBParameters:\fP
.RS 4
\fIday\fP this day of month 
.br
\fImonth\fP this month 
.br
\fIyear\fP this year 
.br
\fIlongitude\fP longitude to use in calculations 
.br
\fIlatitude\fP latitude to use in calculations 
.br
\fIsun_hour\fP return the length of shaa zaminit in minutes 
.br
\fIfirst_light\fP return the utc alut ha-shachar in minutes 
.br
\fItalit\fP return the utc tphilin and talit in minutes 
.br
\fIsunrise\fP return the utc sunrise in minutes 
.br
\fImidday\fP return the utc midday in minutes 
.br
\fIsunset\fP return the utc sunset in minutes 
.br
\fIfirst_stars\fP return the utc tzeit hacochavim in minutes 
.br
\fIthree_stars\fP return the utc shlosha cochavim in minutes 
.RE
.PP

.SS "int \fBhdate_get_gday\fP (\fBhdate_struct\fP const *h)"
.PP
get the Gregorian day of the month \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
the Gregorian day of the month, 1\&.\&.31\&. 
.RE
.PP

.SS "int \fBhdate_get_gmonth\fP (\fBhdate_struct\fP const *h)"
.PP
get the Gregorian month \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
the Gregorian month, jan = 1\&. 
.RE
.PP

.SS "int \fBhdate_get_gyear\fP (\fBhdate_struct\fP const *h)"
.PP
get the Gregorian year \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
the Gregorian year\&. 
.RE
.PP

.SS "int \fBhdate_get_hday\fP (\fBhdate_struct\fP const *h)"
.PP
get the Hebrew day of the month \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
the Hebrew day of the month, 1\&.\&.30\&. 
.RE
.PP

.SS "int \fBhdate_get_hmonth\fP (\fBhdate_struct\fP const *h)"
.PP
get the Hebrew month \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
the Hebrew month, Tishery = 1 \&.\&. Adar I =13, Adar II = 14\&. 
.RE
.PP

.SS "int \fBhdate_get_hyear\fP (\fBhdate_struct\fP const *h)"
.PP
get the Hebrew year \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
the Hebrew year\&. 
.RE
.PP

.SS "int \fBhdate_get_day_of_the_week\fP (\fBhdate_struct\fP const *h)"
.PP
get the day of the week \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
the the day of the week\&. 
.RE
.PP

.SS "int \fBhdate_get_size_of_year\fP (\fBhdate_struct\fP const *h)"
.PP
get the size of the hebrew year \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
the the size of the hebrew year\&. 
.RE
.PP

.SS "int \fBhdate_get_new_year_day_of_the_week\fP (\fBhdate_struct\fP const *h)"
.PP
get the new year day of the week \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
the the new year day of the week\&. 
.RE
.PP

.SS "int \fBhdate_get_julian\fP (\fBhdate_struct\fP const *h)"
.PP
get the Julian day number \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
the Julian day number\&. 
.RE
.PP

.SS "int \fBhdate_get_days\fP (\fBhdate_struct\fP const *h)"
.PP
get the number of days passed since 1 tishrey \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
the number of days passed since 1 tishrey\&. 
.RE
.PP

.SS "int \fBhdate_get_weeks\fP (\fBhdate_struct\fP const *h)"
.PP
get the number of weeks passed since 1 tishrey \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
the number of weeks passed since 1 tishrey\&. 
.RE
.PP

.SS "\fBhdate_struct\fP* \fBnew_hdate\fP ()"
.PP
creat a new hdate struct object, must be deleted using delete_hdate\&. \fBReturns:\fP
.RS 4
a new hdate object 
.RE
.PP

.SS "\fBhdate_struct\fP* \fBdelete_hdate\fP (\fBhdate_struct\fP *h)"
.PP
delete an hdate struct object\&. \fBParameters:\fP
.RS 4
\fIh\fP pointer this hdate struct\&. 
.RE
.PP

.SS "char* \fBhdate_get_version_string\fP ()"
.PP
Return a static string, with the package name and version\&. \fBReturns:\fP
.RS 4
a static string, with the package name and version 
.RE
.PP

.SS "char* \fBhdate_get_translator_string\fP ()"
.PP
name of translator \fBReturns:\fP
.RS 4
a static string with name of translator, or NULL if none\&. 
.RE
.PP

.SS "int \fBhdate_is_hebrew_locale\fP ()"
.PP
helper function to find hebrew locale \fBReturns:\fP
.RS 4
0 - latin locale, -1 - hebrew locale 
.RE
.PP

.SS "char* \fBhdate_string\fP (inttype_of_string, intindex, intshort_form, inthebrew_form)"
.PP
Return string values for hdate information\&. \fBReturns:\fP
.RS 4
a pointer to a string containing the information\&. In the cases integers and omer, the strings will NOT be static, and the caller must free() them after use\&. Returns a null pointer upon failure\&. 
.RE
.PP
\fBParameters:\fP
.RS 4
\fItype_of_string\fP 0 = integer, 1 = day of week, 2 = parshaot, 3 = hmonth, 4 = gmonth, 5 = holiday, 6 = omer 
.br
\fIindex\fP integer ( 0 < n < 11000) day of week ( 0 < n < 8 ) parshaot ( 0 , n < 62 ) hmonth ( 0 < n < 15 ) gmonth ( 0 < n < 13 ) holiday ( 0 < n < 37 ) omer ( 0 < n < 50 ) 
.br
\fIshort_form\fP 0 = short format 
.br
\fIhebrew_form\fP 0 = not hebrew (native/embedded) 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for libhdate C language from the source code\&.