=== Business Day Calendar JP ===
Contributors: hajimebaba
Tags: calendar, business hours, holidays, japan, closed days
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.3.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A business day calendar for shops in Japan. Public holidays are added automatically, and closing days like "2nd Monday" can be selected.

== Description ==

Business Day Calendar JP shows a monthly calendar of the days your business is open and closed.

* **Japanese public holidays are built in.** Fixed holidays, "Happy Monday" holidays, the equinoxes, substitute holidays and Citizens' Holidays are calculated by the plugin for 2000-2099. No external service or API is used.
* **Regular closing days by rule.** Choose weekdays (every Sunday) and "Nth weekday" days (2nd Monday, last Friday) from a simple table. Decide whether public holidays are closing days.
* **Rules that change over time.** If your closing days change from a certain date, add a new rule with its start date. Past months keep showing the old rule.
* **Temporary closings and special openings.** Register a whole period at once (summer break, inventory days), optionally repeating every year (New Year break). A special opening overrides regular closing days and public holidays.
* **Public holiday adjustments.** Remove a holiday or add your own on the settings page, for example after a change of the law, without touching code.
* **Business hours.** Set default hours and different hours for single weekdays, and show them together with your regular closing days.
* **Easy to show.** Add `[business_day_calendar]` to any page, post or widget. Colors and legend text can be changed.
* **Accessible.** Closed days also carry text for screen readers, not only color.

= Shortcode =

* `[business_day_calendar]` - this month, with previous / next month links
* `[business_day_calendar months="3"]` - several months
* `[business_day_calendar month="2027-01"]` - a fixed month
* `[business_day_calendar nav="no" legend="no"]` - hide the month links and the legend
* `[business_day_today]` - a line such as "Today (10/21 Wed) is a business day." It stays correct on pages kept by a page cache, because a small script picks today's entry in the site time zone.

* `[business_hours]` - business hours and regular closing days, for example "Mon-Fri: 9:30 - 18:30" and "Sunday, 2nd Monday, Public holidays". Use `closed="no"` to hide the closing days.

= For developers =

The filter `bdcjp_holidays` lets you add, remove or rename public holidays for a year (for example after a change of the law). It receives an array of `'Y-m-d' => 'name'` and the year.

== Installation ==

1. Upload the `business-day-calendar-jp` folder to `/wp-content/plugins/`, or install the plugin from the Plugins screen.
2. Activate the plugin.
3. Open Settings > Business Day Calendar JP and set your regular closing days.
4. Put `[business_day_calendar]` in a page.

== Frequently Asked Questions ==

= Which years are supported? =

Public holidays are calculated for 2000-2099.

= Does it send data to other sites? =

No. Holidays are calculated inside the plugin, and the plugin makes no external requests.

= The "today" mark in the monthly calendar is not on today's date. =

If a page cache plugin is used, the cached page can show yesterday's mark until the cache is refreshed. The closing days themselves are not affected. The `[business_day_today]` line is not affected, because it is updated in the browser.

= The law changed and a holiday is wrong. =

Use the `bdcjp_holidays` filter to correct it, and please report it in the support forum.

== Changelog ==

= 0.3.1 =
* Load the bundled Japanese translation explicitly, so the settings page and the calendar are shown in Japanese on every site.

= 0.3.0 =
* Added public holiday adjustments (add or remove a holiday) to the settings page.
* Added business hours, the `[business_hours]` shortcode, and hours in the `[business_day_today]` text.

= 0.2.0 =
* Added the `[business_day_today]` shortcode.

= 0.1.0 =
* First release.
