=== HB Jewish Calendar ===

Contributors:      HBCode
Requires at least: 6.4
Tested up to:      6.9
Requires PHP:      7.4
Stable tag:        2.0.0
License:           GPL v3 or later
License URI:       https://www.gnu.org/licenses/gpl-3.0.html
Tags:              date, hebrew, jewish-calendar, parasha, zmanim

Display Hebrew dates, Parasha, zmanim and an interactive monthly Hebrew calendar via shortcodes and Elementor widgets.


== Description ==

HB Jewish Calendar provides accurate Hebrew date information, weekly Torah portions (Parasha), zmanim (Jewish times), and a fully client-side monthly Hebrew calendar. Calculations are performed in the browser using the bundled 'Hebcal' library.

Key capabilities:

- Shortcodes to embed a monthly Hebrew calendar, today’s Hebrew date, current weekday, Parasha and individual zmanim values (with optional minute offset).
- Elementor widgets mirroring the shortcodes, grouped under the "Hebrew Calendar" category, with style and prefix controls.
- Admin settings to select a city (used for zmanim) and toggle Parasha Israel/Diaspora behavior.


== Features ==

- Shortcodes:
  - `jcal_heb_calendar` — Embed a monthly Hebrew calendar with holidays.
  - `jcal_today_hdate` — Show today's Hebrew date.
  - `jcal_day_in_week` — Show the current weekday name.
  - `jcal_parasha` — Show this week's Parasha (Israel / Diaspora controlled in settings).
  - `jcal_zmanim` — Show a specific zman (Jewish time); supports `type` and `offset` attributes.
- Elementor widgets for the same features (category: "Hebrew Calendar"): `Hebrew Calendar`, `Today hebrew date`, `Parashat hashavua`, `Zmanim`, `Day in week`.
- Settings page (`JCal Settings`) to choose city for zmanim and set Parasha display (Israel or Diaspora).
- Localized: supports both Hebrew and English.
- All date & holiday calculations are performed client-side using the bundled 'Hebcal' library.


== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/hb-jewish-calendar` or install via the WordPress plugin installer.
2. Activate the plugin from the 'Plugins' screen in WordPress.
3. (Optional) Visit the JCal Settings admin page to choose your city and Parasha diaspora setting.


== Usage ==

Shortcodes:

- ` [jcal_heb_calendar] ` — Renders the monthly Hebrew calendar. The calendar also displays holidays.
- ` [jcal_today_hdate] ` — Outputs today's Hebrew date (localized to site language).
- ` [jcal_day_in_week] ` — Outputs the current weekday name (localized).
- ` [jcal_parasha] ` — Outputs the current Parasha. Use settings to choose Israel or Diaspora version.
- ` [jcal_zmanim type="<type>" offset="<minutes>"] ` — Outputs a zman value. `type` is one of:
  - `chatzotNight`, `alotHaShachar`, `alotHaShachar72`, `neitzHaChama`, `sunrise`,
  - `sofZmanShma`, `sofZmanShmaMGA`, `sofZmanShmaMGA16Point1`, `sofZmanTfilla`, `sofZmanTfillaMGA`,
  - `sofZmanTfillaMGA16Point1`, `chatzot`, `minchaGedola`, `minchaGedolaMGA`, `minchaKetana`,
  - `minchaKetanaMGA`, `plagHaMincha`, `sunset`, `shkiah`, `beinHaShmashos`, `dusk`,
  - `tzeit`, `misheyakir`.
  - `offset` is an integer number of minutes to add/subtract.


Elementor widgets: find the "Hebrew Calendar" category in Elementor; widgets provide style controls, optional prefixes and allow inserting the same shortcodes as elements.


== Settings Page ==

Access: `WP Admin → JCal Settings` (menu entry appears for users with `manage_options`).

- City: choose a city (used for zmanim calculations).
- Parasha Display: choose `Israel` or `Diaspora` to control how the weekly Parasha is determined.


== Localization ==

Translation files are included in the `languages/` directory. The plugin uses the text domain `hb-jewish-calendar`.


== Changelog ==
= 2.0.0 =
* All date and holiday calculations are performed client-side using the bundled Hebcal library (`hebcal.min.js`).
* New approach improves performance and allows better handling of results.

= 1.3.5 =
* Fix bug of calendar links

= 1.3.2 =
* Fix bug of parasha display

= 1.3.0 =
* Added zmanim support

= 1.2.1 =
* Added holiday display to the calendar

= 1.2.0 =
* Added elementor support

= 1.0.0 =
* First version!


== Credits ==

Developed by HBCode.

This plugin bundles a minified build of the Hebcal library (js/hebcal.min.js) for client-side Hebrew calendar calculations:
https://github.com/hebcal/hebcal-es6

Hebcal is provided under the Creative Commons Attribution 4.0 International License (CC BY 4.0). See Hebcal for details and privacy policy: https://www.hebcal.com/home/privacy-policy


== Support ==

For support, contact the developer.


== License ==

This plugin is licensed under GPL v3 or later: https://www.gnu.org/licenses/gpl-3.0.html

