Class Xyster_Date_Range

Description

A date range

  • copyright: Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net)
  • license: New BSD License

Located in /Date/Range.php (line 28)


	
			
Variable Summary
Zend_Date $_end
Zend_Date $_start
Method Summary
Xyster_Date_Range __construct ( $start,  $end)
Zend_Date getEnd ()
Zend_Date getStart ()
mixed getTimespan ([string $part = null], [mixed $locale = null])
boolean isWithin (mixed $date, [string $part = null], [mixed $locale = null])
string __toString ()
Variables
Zend_Date $_end (line 38)
  • access: protected
Zend_Date $_start (line 33)
  • access: protected
Methods
Constructor __construct (line 47)

A date range

  • throws: Zend_Date_Exception if the end date occurs before the start
  • access: public
Xyster_Date_Range __construct ( $start,  $end)
  • Zend_Date $start: The starting date
  • Zend_Date $end: The ending date
getEnd (line 62)

Gets the ending date

  • return: the ending date
  • access: public
Zend_Date getEnd ()
getStart (line 72)

Gets the beginning date

  • return: the beginning date
  • access: public
Zend_Date getStart ()
getTimespan (line 86)

Gets the timespan between these dates

The part and locale are the same as used in many Zend_Date methods.

  • return: the timespan
  • access: public
mixed getTimespan ([string $part = null], [mixed $locale = null])
  • string $part: OPTIONAL Part of the date to sub, if null the timestamp is subtracted
  • mixed $locale: OPTIONAL Locale as a Zend_Locale or a string for parsing input
isWithin (line 102)

Tests to see if the supplied date is within this range

The part and locale are the same as used in many Zend_Date methods.

  • throws: Zend_Date_Exception
  • access: public
boolean isWithin (mixed $date, [string $part = null], [mixed $locale = null])
  • mixed $date: Date or datepart to compare with the date object
  • string $part: OPTIONAL Part of the date to compare, if null the timestamp is compared
  • mixed $locale: OPTIONAL Locale as a Zend_Locale or a string for parsing input
__toString (line 118)

Returns the string representation of this object

The dates are separated by an En Dash (U+2013)

  • magic:
  • access: public
string __toString ()

Documentation generated on Mon, 19 May 2008 17:07:30 -0400 by phpDocumentor 1.4.2