Date System: Day + Month + Year
Herodotus stores an event date separately from its WordPress publication date. Day and month determine the recurring calendar date; the historical year and era determine chronological order and the anniversary counter.
How It Works
| Meta key | Value | Purpose |
|---|---|---|
_herodotus_day | 1-31 | Day of month |
_herodotus_month | 1-12 | Month |
_herodotus_year | Positive integer | Historical year |
_herodotus_era | BC, AD or empty | Historical era and optional suffix |
_herodotus_md | Derived integer | Combined month/day query key |
_herodotus_sort_year | Derived signed integer | Negative for BC, positive for AD |
The Logic
- The plugin reads the date in the WordPress timezone.
- The active date mode selects one date or a set of recurring month/day pairs.
- Published events with complete date data are selected, filtered and limited.
- Results are grouped by date and ordered within each group.
The historical year does not have to match the current year. It is still required for eligibility in the date-based query, sorting, the badge and the years-ago counter. It is not merely a display label.
Example
An event dated March 14, 1879 appears on March 14 each year. Its badge can show 1879 or 1879 AD. A BC event uses a positive year plus the BC era; do not enter a negative year.
Timezone Handling
Set your site timezone under Settings → General → Timezone. The date query uses that timezone. A full-page cache can still serve yesterday's rendered output until it is purged.
Date Modes
Free supports Today. Pro adds Around today, a fixed date and upcoming ranges. The range changes which calendar dates are selected, not the historical year stored on an event. See All Attributes.
Updating Date Data
The editor, Quick Edit and Pro importer update the derived query keys when they save dates. Direct database or custom metadata writes must also keep these keys consistent. The standard WordPress REST API in 1.6.8 exposes day, month, year and optional era to authorized editors in context=edit. Successful REST writes synchronize the derived keys before responding. Other metadata writes synchronize before the next event query or at shutdown. See Developer Reference.
