Here's a patch that replaces "28" with "29" in the array daysofmonths[]. This allows a user to annotate February 29 in any given year. (If the year is not a leap year, the date resolves to March 1.)

Temlakos

--- ../SemanticMediaWiki-lng/SMW_DV_Time.php    2009-08-12 08:10:16.000000000 
-0400
+++ ./SMW_DV_Time.php   2009-08-12 08:11:39.000000000 -0400
@@ -99,7 +99,7 @@
        protected $m_months = array("January", "February", "March", "April" , 
"May" , "June" , "July" , "August" , "September" , "October" , "November" , 
"December");
        protected $m_monthsshort = array("Jan", "Feb", "Mar", "Apr", "May", 
"Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
        protected $m_formats = array( SMW_Y => array('year'), SMW_YM => 
array('year','month'), SMW_MY => array('month','year'), SMW_YDM => 
array('year','day','month'), SMW_YMD => array('year','month','day'), SMW_DMY => 
array('day','month','year'), SMW_MDY => array('month','day','year'));
-       protected $m_daysofmonths = array ( 1 => 31, 2 => 28, 3 => 31, 4 => 30, 
5 => 31, 6 => 30, 7 => 31, 8 => 31, 9 => 30, 10 => 31, 11 => 30, 12 => 31 );
+       protected $m_daysofmonths = array ( 1 => 31, 2 => 29, 3 => 31, 4 => 30, 
5 => 31, 6 => 30, 7 => 31, 8 => 31, 9 => 30, 10 => 31, 11 => 30, 12 => 31 );
        // Time zone monikers and their associated offsets in hours and 
fractions of hours
        protected $m_tz = array("A" => 1, "ACDT" => 10.5, "ACST" => 9.5, "ADT" 
=> -3, "AEDT" => 11,
                "AEST" => 10, "AKDT" => -8, "AKST" => -9, "AST" => -4, "AWDT" 
=> 9, "AWST" => 8,
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to