=== AddonLogic Date/Time Field ===
Contributors: snehalpancholi
Tags: date field, time field, meta field, shortcode, event date
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Register named date/time meta fields on any post type and display them with format options, relative labels, and a shortcode.

== Description ==

Date/Time Field lets you register named date or datetime meta fields (e.g. event_date, expiry_date) that appear as native HTML date/datetime-local pickers in the post editor sidebar. The `[date_field]` shortcode renders the saved value in any PHP date format, as a relative label ("in 3 days"), as an ISO 8601 string, or as a raw Unix timestamp.

**Core Features:**

* Unlimited named date/time fields defined in settings
* Native HTML5 date and datetime-local pickers in the post editor
* Four output modes: formatted, relative, iso, timestamp
* Per-field format override plus a global default format
* Optional include_time toggle per field
* Human-readable relative time output with i18n support
* Optional schema.org `datePublished` itemprop on `<time>` element
* Relative time displayed in the meta box for at-a-glance context

== Installation ==

1. Upload `date-time-field` to `/wp-content/plugins/`.
2. Activate via **Plugins > Installed Plugins**.
3. Go to **Settings > Date / Time Field**.
4. Add date fields (key, label, optional format, include time toggle).
5. Select which post types show the pickers.
6. Edit a post — date pickers appear in the sidebar.
7. Use `[date_field key="event_date"]` in content.

== Frequently Asked Questions ==

= Can I show "in 3 days" instead of the formatted date? =
Yes: `[date_field key="event_date" output="relative"]`

= Does it output correct semantic HTML? =
Yes. The shortcode wraps output in a `<time>` element with a `datetime` attribute in ISO 8601 format, which is correct for accessibility and SEO.

= What if no date is set? =
The shortcode outputs nothing, or the value of the `default=` attribute if provided.

= Can I override the format for one shortcode instance? =
Yes: `[date_field key="event_date" format="d M Y"]`

== Changelog ==

= 1.0.0 =
* Initial release.

== Screenshots ==

1. Settings page showing field registration with format and time options.
2. Date picker in the post editor sidebar with relative time hint.
3. Frontend output showing formatted date and relative mode.
