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.
Gives web site visitors a quick way to determine the Day of the Week for any date up to almost seven thousand years in the past or future. The plugin provides both a
[pcal] shortcode and jr_weekday function, providing a choice in how it is implemented.
Click here and scroll down for a Live Demo of the Plugin: http://jonradio.com/plugins/jonradio-perpetual-calendar/
The term "Perpetual Calendar" normally refers to the display of 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 an HTML
<form> that prompts the user to select a Month, Day, and Year from drop-down lists. Clicking 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) 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
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 within the Network.
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.
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.
At present, this plugin is only available in English. Anyone interested in providing translation files and localization information for this plugin into any language and culture is strongly encouraged to visit this page for more information: http://jonradio.com/plugins