Seed Buddhist Year
Change output year to Buddhist year or Buddhist Era (BE).
Install in
Seed Buddhist Year shows the year in the Buddhist Era (BE = CE + 543) where WordPress shows post and comment dates to readers. Dates that code reads, such as feeds and datetime attributes, stay in the Common Era (CE).
Just install and activate. The year changes to BE in:
- Post dates and times from get_the_date(), the_date(), get_the_time() and the_time()
- Comment dates from get_comment_date() and comment_date()
- The Post Date block, including on WordPress 6.9 and later
- Places that use these functions, such as archive titles, the Latest Posts and Comment Date blocks, and most date columns in the admin lists
These stay in CE on purpose, so feed readers, search engines and other code get the real date:
- Post and comment feeds (RSS2, Atom)
- Dates in the ‘c’, ‘r’ and ‘U’ formats and in the PHP constants DATE_ATOM, DATE_COOKIE, DATE_ISO8601, DATE_RFC822, DATE_RFC850, DATE_RFC1036, DATE_RFC1123, DATE_RFC2822, DATE_RFC3339, DATE_RSS and DATE_W3C, which WordPress and most themes use for
datetimeattributes - The publish date when you schedule changes in the Customizer
These are not changed:
- Modified (“last updated”) dates
- The Latest Comments block, the Archives widget or block, and the Calendar widget or block
- The Activity box on the Dashboard
- Dates in the block editor
- Dates that a theme or plugin prints with date_i18n(), wp_date() or PHP date(), such as WooCommerce order dates
Official development of Seed Buddhist Year is on GitHub, with official stable releases published on WordPress.org. The GitHub repo can be found at https://github.com/SeedWebs/seed-buddhist-year. Please use the Support tab for potential bugs, issues, or enhancement ideas.
Written by Joobi from the project's own listing. See the source page
1.0.5
- Fix: The Post Date block shows the BE year again on WordPress 6.9 and later.
- Fix: Comment feeds (RSS2, Atom) show the real comment date. Before, every comment was dated today.
- Fix: Comment
datetimeattributes and get_comment_time( ‘U’ ) return the real value. - Fix: get_comment_time() with a format that includes the year shows the BE year. Before, it always showed the time.
- Fix: Saving a scheduled change in the Customizer no longer moves its publish date 543 years ahead. If you scheduled Customizer changes before this update, open the Customizer and check the publish date.
- Fix: On WordPress 6.3 to 6.8, the Post Date block set to the modified date no longer disappears.
- Fix: get_comment_date() keeps the CE year for DATE_* formats, like post dates do.
- Fix: Date formats with an escaped y (\y or \Y) work.
- Fix: No PHP warnings when other code runs the date filters without a post.
- Hardening: Block direct access to the plugin file.
- Removed: The internal helper function fix_seed_buddhist_year_comment_time().
- Requires WordPress 4.9 and PHP 7.4. Tested up to WordPress 7.1.
1.0.4
- Date: 15 MAY 2024
- Fix: $gmt variable
1.0.3
- Date: 5 MAR 2021
- Fix: undefined variable: comment
1.0.2
- Fix: Predefined Constants problem (to support Yoast SEO).
1.0.1
- New: Support comment date.
1.0.0
- Date: 2016-05-11
- Fix: leap year problem.
0.9.0
- First version.
Follow this listing's changes (Atom feed)