---
name: "hdate_Hdate"
section: "3"
platform: "linux"
package: "libhdate-dev"
version: "1.6.02-2.1+b8"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/hdate_Hdate"
---

# hdate\_Hdate(3)

Hdate class.

## NAME

hdate::Hdate - **Hdate** class.

## SYNOPSIS

`#include <hdatepp.h>`

### Public Member Functions

**Hdate** ()\
 **Hdate** *constructor.*  **~Hdate** ()\
 **Hdate** *destructor.*  void **set\_gdate** (int d, int m, int y)\
 *compute date structure from the Gregorian date*  void **set\_hdate** (int d, int m, int y)\
 *compute date structure from the Hebrew date*  void **set\_jd** (int jd)\
 *compute date structure from the Julian day*  char \* **get\_format\_date** (int s)\
 *get formatted hebrew date.*  char \* **get\_day\_of\_week\_string** (int s)\
 *get name of week day.*  char \* **get\_month\_string** (int s)\
 *get name month.*  char \* **get\_hebrew\_month\_string** (int s)\
 *get name hebrew month.*  char \* **get\_holyday\_string** (int s)\
 *get name hebrew holiday.*  int **get\_holyday\_type** ()\
 *get the hebrew holiday type.*  char \* **get\_parasha\_string** (int s)\
 *get name hebrew parasha.*  char \* **get\_hebrew\_year\_string** ()\
 *get name hebrew year.*  char \* **get\_hebrew\_day\_string** ()\
 *get name hebrew hebrew day of the month*  int **get\_parasha** ()\
 *get parash number*  int **get\_holyday** ()\
 *get holiday number*  int **get\_gday** ()\
 *get Gregorian day of the month*  int **get\_gmonth** ()\
 *get Gregorian month*  int **get\_gyear** ()\
 *get Gregorian year*  int **get\_hday** ()\
 *get Hebrew day of the month*  int **get\_hmonth** ()\
 *get Hebrew month*  int **get\_hyear** ()\
 *get Hebrew year*  int **get\_day\_of\_the\_week** ()\
 *get the day of the week*  int **get\_size\_of\_year** ()\
 *get the size of the Hebrew year in days*  int **get\_new\_year\_day\_of\_the\_week** ()\
 *get the day of the week of hebrew new years*  int **get\_julian** ()\
 *get the Julian day number*  int **get\_days** ()\
 *get the number of days sice Tishrey I*  int **get\_weeks** ()\
 *get the number of weeks sice Tishrey I*  void **set\_location** (double in\_latitude, double in\_longitude, int in\_tz)\
 *set location*  int **get\_sunrise** ()\
 *sunrise time*  int **get\_sunset** ()\
 *sunset time*  int **get\_first\_light** ()\
 *first light time*  int **get\_talit** ()\
 *talit time*  int **get\_first\_stars** ()\
 *first stars time*  int **get\_three\_stars** ()\
 *three stars time*  int **get\_sun\_hour** ()\
 *sun light hour time*  int **get\_midday** ()\
 *midday hour time*  char \* **get\_translator\_string** ()\
 *name of translator*  void **set\_diaspora** ()\
 *set this* **hdate** *object to use diaspora holidays and dates*  void **set\_israel** ()\
 *set this* **hdate** *object to use israel holidays and dates*

## Detailed Description

**Hdate** class.

class for Hebrew/Gregorian date conversions

## Constructor & Destructor Documentation

### hdate::Hdate::Hdate ()` [inline]`

**Hdate** constructor.

### hdate::Hdate::~Hdate ()` [inline]`

**Hdate** destructor.

## Member Function Documentation

### void hdate::Hdate::set\_gdate (int d, int m, int y)` [inline]`

compute date structure from the Gregorian date

**Parameters:**

*d* Day of month 1..31 \
 *m* Month 1..12 , if m or d is 0 return current date. \
 *y* Year in 4 digits e.g. 2001

### void hdate::Hdate::set\_hdate (int d, int m, int y)` [inline]`

compute date structure from the Hebrew date

**Parameters:**

*d* Day of month 1..31 \
 *m* Month 1..14 , if m or d is 0 return current date. \
 *y* Year in 4 digits e.g. 5731

### void hdate::Hdate::set\_jd (int jd)` [inline]`

compute date structure from the Julian day

**Parameters:**

*jd* the julian day number.

### char\* hdate::Hdate::get\_format\_date (int s)` [inline]`

get formatted hebrew date.

return the short ( e.g. '1 Tishrey' ) or long (e.g. 'Tuesday 18 Tishrey 5763 Hol hamoed Sukot' ) formatted date.

**Parameters:**

*s* short flag.

**Returns:**

a static string of foramted date

### char\* hdate::Hdate::get\_day\_of\_week\_string (int s)` [inline]`

get name of week day.

**Parameters:**

*s* short flag true - returns a short string: sun, false returns: sunday.

**Returns:**

a static string of the day of the week

### char\* hdate::Hdate::get\_month\_string (int s)` [inline]`

get name month.

**Parameters:**

*s* short flag true - returns a short string: Mar, false returns: March.

**Returns:**

a static string of month name

### char\* hdate::Hdate::get\_hebrew\_month\_string (int s)` [inline]`

get name hebrew month.

**Parameters:**

*s* short flag true - returns a short string.

**Returns:**

a static string of hebrew month name

### char\* hdate::Hdate::get\_holyday\_string (int s)` [inline]`

get name hebrew holiday.

**Parameters:**

*s* short flag true - returns a short string.

**Returns:**

a static string of hebrew holiday name

### int hdate::Hdate::get\_holyday\_type ()` [inline]`

get the hebrew holiday type.

**Returns:**

the holiday type (1- regular holyday, 2- three regels, 3- tzom, 0- no holiday)

### char\* hdate::Hdate::get\_parasha\_string (int s)` [inline]`

get name hebrew parasha.

**Parameters:**

*s* short flag true - returns a short string.

**Returns:**

a static string of hebrew parash name

### char\* hdate::Hdate::get\_hebrew\_year\_string ()` [inline]`

get name hebrew year.

**Returns:**

a static string of hebrew year

### char\* hdate::Hdate::get\_hebrew\_day\_string ()` [inline]`

get name hebrew hebrew day of the month

**Returns:**

a static string of hebrew day of the month

### int hdate::Hdate::get\_parasha ()` [inline]`

get parash number

**Returns:**

the hebrew parasha number

### int hdate::Hdate::get\_holyday ()` [inline]`

get holiday number

**Returns:**

the hebrew holiday number

### int hdate::Hdate::get\_gday ()` [inline]`

get Gregorian day of the month

**Returns:**

the Gregorian day of the month

### int hdate::Hdate::get\_gmonth ()` [inline]`

get Gregorian month

**Returns:**

the Gregorian month

### int hdate::Hdate::get\_gyear ()` [inline]`

get Gregorian year

**Returns:**

the Gregorian year

### int hdate::Hdate::get\_hday ()` [inline]`

get Hebrew day of the month

**Returns:**

the Hebrew day of the month

### int hdate::Hdate::get\_hmonth ()` [inline]`

get Hebrew month

**Returns:**

the Hebrew month

### int hdate::Hdate::get\_hyear ()` [inline]`

get Hebrew year

**Returns:**

the Hebrew year

### int hdate::Hdate::get\_day\_of\_the\_week ()` [inline]`

get the day of the week

**Returns:**

the day of the week

### int hdate::Hdate::get\_size\_of\_year ()` [inline]`

get the size of the Hebrew year in days

**Returns:**

the size of the Hebrew year in days

### int hdate::Hdate::get\_new\_year\_day\_of\_the\_week ()` [inline]`

get the day of the week of hebrew new years

**Returns:**

the day of the week of hebrew new years

### int hdate::Hdate::get\_julian ()` [inline]`

get the Julian day number

**Returns:**

the Julian day number

### int hdate::Hdate::get\_days ()` [inline]`

get the number of days sice Tishrey I

**Returns:**

the the number of days sice Tishrey I

### int hdate::Hdate::get\_weeks ()` [inline]`

get the number of weeks sice Tishrey I

**Returns:**

the the number of weeks sice Tishrey I

### void hdate::Hdate::set\_location (double in\_latitude, double in\_longitude, int in\_tz)` [inline]`

set location

**Parameters:**

*in\_longitude* longitude to use in calculations degrees, negative values are east \
 *in\_latitude* latitude to use in calculations degrees, negative values are south \
 *in\_tz* time zone

### int hdate::Hdate::get\_sunrise ()` [inline]`

sunrise time

**Returns:**

sunrise in minutes after midnight (00:00)

### int hdate::Hdate::get\_sunset ()` [inline]`

sunset time

**Returns:**

sunset in minutes after midnight (00:00)

### int hdate::Hdate::get\_first\_light ()` [inline]`

first light time

**Returns:**

first light in minutes after midnight (00:00)

### int hdate::Hdate::get\_talit ()` [inline]`

talit time

**Returns:**

talit time in minutes after midnight (00:00)

### int hdate::Hdate::get\_first\_stars ()` [inline]`

first stars time

**Returns:**

first stars in minutes after midnight (00:00)

### int hdate::Hdate::get\_three\_stars ()` [inline]`

three stars time

**Returns:**

three stars in minutes after midnight (00:00)

### int hdate::Hdate::get\_sun\_hour ()` [inline]`

sun light hour time

**Returns:**

sun light hour in minutes

### int hdate::Hdate::get\_midday ()` [inline]`

midday hour time

**Returns:**

midday hour in minutes

### char\* hdate::Hdate::get\_translator\_string ()` [inline]`

name of translator

**Returns:**

a static string with name of translator, or NULL if none

### void hdate::Hdate::set\_diaspora ()` [inline]`

set this **hdate** object to use diaspora holidays and dates

### void hdate::Hdate::set\_israel ()` [inline]`

set this **hdate** object to use israel holidays and dates

## Author

Generated automatically by Doxygen for libhdate C++ language from the source code.
