The jonradio Perpetual Calendar plugin provides both a Shortcode and a php Function that each return a message indicating the full name of the day of the week for a given date.
The term Perpetual Calendar normally refers to the display a calendar of any week or month across a broad range of years. However, it is almost always used to determine the day of the week for a given date, which is what this plugin does.
Once the plugin is successfully installed and activated, adding the Shortcode
[pcal] to any WordPress Post or Page will insert a Form that prompts the user to select a Month, Day, and Year from drop-down lists. Hitting the Display Day of Week button will generate a message above the Form indicating the full name of the day of the week for the given date. Or an error message for all invalid dates. Clicking the Help and Info button will display, right below the Perpetual Calendar, instructions explaining what it is and how to use it.
To reduce the size of the drop-down lists, the Year is entered in three parts: (1) the first one or two digits (“century”); (2) second to last digit (“tens”); and (3) last digit. Plugin Settings are provided within the WordPress Admin panels to display current era dates as A.D., CE or solely by the numeric Year; ancient dates are displayed as B.C. or BCE, or are not allowed when current era dates are displayed solely as numbers. A.D./B.C. is the default.
The jr_weekday function is also defined upon plugin activation, so that it can be called in any php code, including templates, within your WordPress environment. It returns the same message as the
[pcal] shortcode; it does NOT directly display through echo or other means. And it does not display the user input form, i.e. – the HTML <form>.
If Network is turned on in WordPress, Network Activation of the plugin allows both the plugin and shortcode to be called from all WordPress sites within the Network. Alternatively, the plugin can also be activated for individual sites.
Supported dates range from November 25, 4714 B.C. (1 A.D. when Plugin Settings specify “Do not allow Dates more then 2000 Years in the Past”) to December 31, 9999 A.D.; the jr_weekday function accepts years larger than 9999, but it has not been tested for accuracy past the year 9999. Illegal dates, such as February 31 of any year, and the Year Zero (A.D. or B.C.), are detected and an error message is returned in place of the message indicating the weekday.
Here is what the user will see if you use the
[pcal] shortcode in a Page or Post:
Feel free to try it out (above) — it actually works. Click Help and Info to see the Site Visitor usage information provided.
Multiple uses of the
[pcal] Shortcode on the same Page are detected: the first works normally, but all others are ignored. Likewise, displaying multiple Posts, with
[pcal] occurring more than once across all the displayed Posts.
[pcal] shortcode has been tested with the following popular Themes: Twenty Eleven, Twenty Ten, Delicate, PageLines, Responsive, Suffusion.
WordPress Plugin Repository page for this plugin: http://wordpress.org/extend/plugins/jonradio-perpetual-calendar/
If you wish to donate, click here to view the home page for all jonradio Plugins.