port the non-functional season repeaters
authorChuck Hagenbuch <chuck@horde.org>
Thu, 29 Jan 2009 17:00:26 +0000 (12:00 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Thu, 29 Jan 2009 22:13:03 +0000 (17:13 -0500)
framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base/Repeater/Season.php
framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base/Repeater/SeasonName.php

index a255865..1c57d1c 100644 (file)
@@ -1,23 +1,31 @@
-class Chronic::RepeaterSeason < Chronic::Repeater #:nodoc:
-  SEASON_SECONDS = 7_862_400 # 91 * 24 * 60 * 60
-  
-  def next(pointer)
-    super
-    
-    raise 'Not implemented'
-  end
-  
-  def this(pointer = :future)
-    super
-    
-    raise 'Not implemented'
-  end
-  
-  def width
-    SEASON_SECONDS
-  end
-  
-  def to_s
-    super << '-season'
-  end
-end
\ No newline at end of file
+<?php
+class Horde_Date_Parser_Locale_Base_Repeater_Season extends Horde_Date_Parser_Locale_Base_Repeater
+{
+    /**
+     * 91 * 24 * 60 * 60
+     */
+    const SEASON_SECONDS = 7862400;
+
+    public function next($pointer)
+    {
+        parent::next($pointer);
+        throw new Horde_Date_Parser_Exception('Not implemented');
+    }
+
+    public function this($pointer = 'future')
+    {
+        parent::this($pointer);
+        throw new Horde_Date_Parser_Exception('Not implemented');
+    }
+
+    public function width()
+    {
+        return self::SEASON_SECONDS;
+    }
+
+    public function __toString()
+    {
+        return parent::__toString() . '-season';
+    }
+
+}
index adfd1f2..210332c 100644 (file)
@@ -1,24 +1,36 @@
-class Chronic::RepeaterSeasonName < Chronic::RepeaterSeason #:nodoc:
-  @summer = ['jul 21', 'sep 22']
-  @autumn = ['sep 23', 'dec 21']
-  @winter = ['dec 22', 'mar 19']
-  @spring = ['mar 20', 'jul 20']
-  
-  def next(pointer)
-    super
-    raise 'Not implemented'
-  end
-  
-  def this(pointer = :future)
-    super
-    raise 'Not implemented'
-  end
-  
-  def width
-    (91 * 24 * 60 * 60)
-  end
-  
-  def to_s
-    super << '-season-' << @type.to_s
-  end
-end
\ No newline at end of file
+<?php
+class Horde_Date_Parser_Locale_Base_Repeater_SeasonName extends Horde_Date_Parser_Locale_Base_Repeater_Season
+{
+    /**
+     * 91 * 24 * 60 * 60
+     */
+    const SEASON_SECONDS = 7862400;
+
+    public $summer = array('jul 21', 'sep 22');
+    public $autumn = array('sep 23', 'dec 21');
+    public $winter = array('dec 22', 'mar 19');
+    public $spring = array('mar 20', 'jul 20');
+
+    public function next($pointer)
+    {
+        parent::next($pointer);
+        throw new Horde_Date_Parser_Exception('Not implemented');
+    }
+
+    public function this($pointer = 'future')
+    {
+        parent::this($pointer);
+        throw new Horde_Date_Parser_Exception('Not implemented');
+    }
+
+    public function width()
+    {
+        return self::SEASON_SECONDS;
+    }
+
+    public function __toString()
+    {
+        return parent::__toString() . '-season-' . $this->type;
+    }
+
+}