calendar.class.php updates and new version release
Just put up the new version of my php calendar class (version 2.7).
Just put up the new version of my php calendar class (version 2.7).
A couple of calendar class users have noticed a problem with the first day of the month when using the class with versions of PHP earlier than 5.1.0. The issue was introduced with the last upgrade when I switched to date(”N”) for calculating the day that the first of the month falls on. date(”N”) was added in PHP at version 5.1.0 so earlier versions will have this problem. The quick remedy appears to be switching things back to use date(”w”) for this calculation.
Sorry for any inconvenience this may have caused people. I’ll have a fix in the next couple of days to address the issue fully.
A couple of calendar class users noticed an issue with the feature for controlling the day that weeks start on. The class has been updated with a fix. The fix involves replacing the use of PHP’s data(”w”) with date(”N”). date(”N”) uses the ISO-8601 numeric representation of the day of the week. Days of the week are represented as 1 = Monday thru 7 = Sunday. This is different from the old behavior which was 0 = Sunday thru 6 = Saturday.
Since the new behavior could cause unexpected display if the user was unaware of the change, the old property for controlling this feature has been disabled. Use the new property $week_start to control this feature now! Using the disabled week_start_on property will cause an error message to be displayed!
The new version (v2.6) is available for download on the calendar.class.php download page
I have just released a new version of my PHP calendar generation class. This new version (version 2.5) implements some features users have requested in comments on this site.
You can now specify the starting day of the week. The calendar can be set to only link the days specified in the $highlighted_dates array and, you can now supply a formating string for constructing the links. The last feature allows you to integrate the calendar into sites and applications using Cruft-free URLs.
A new version of my php calendar class is now available for download. This new version adds localization and the ability to mark dates that have passed. The download also now includes an examples directory with 8 demonstrations of using the class in various ways. A basic CSS file is also included with the examples as well.