| core_date

# Class: Bs_DateUtil Source Location: /core/date/Bs_DateUtil.class.php
### Class Overview
    Bs_Object
       |
       --Bs_DateUtil
#### Author(s): andrej arn <at blueshoes dot org> #### Version: 4.5.$Revision: 1.2 $ $Date: 2003/10/29 17:48:37 $ #### Copyright: blueshoes.org | ### Variables $_Bs_String | ### Methods Bs_DateUtil dayOfWeek isInFuture isInLeapYear isInPast isLeapYear isValidDate setNow weekOfYear weekOfYear
### Inherited Variables | ### Inherited Methods #### Class: Bs_Object Bs_Object::Bs_Object() Bs_Object::getErrors() Basic error handling: Get *all* errors as string array from the global Bs_Error-error stack. Bs_Object::getLastError() Basic error handling: Get last error string from the global Bs_Error-error stack. Bs_Object::getLastErrors() Basic error handling: Get last errors string array from the global Bs_Error-error stack sinc last call of getLastErrors(). Bs_Object::persist() Persists this object by serializing it and saving it to a file with unique name. Bs_Object::setError() Basic error handling: Push an error string on the global Bs_Error-error stack. Bs_Object::toHtml() Dumps the content of this object to a string using PHP's var_dump(). Bs_Object::toString() Dumps the content of this object to a string using PHP's var_dump(). Bs_Object::unpersist() Fetches an object that was persisted with persist()
### Class Details [line 15] #### Tags:
copyright: | blueshoes.org
version: | 4.5.$Revision: 1.2 $ $Date: 2003/10/29 17:48:37 $
author: | andrej arn <at blueshoes dot org>
[ Top ] ### Class Variables #### $_Bs_String = [line 20] reference to the global pseudostatic Bs_String object.
Type: | mixed
[ Top ] ### Class Methods ### constructor Bs_DateUtil [line 45]
`Bs_DateUtil Bs_DateUtil( )`
[ Top ] ### method dayOfWeek [line 132]
`int dayOfWeek( string $date)`
returns the day-of-week number for the given date. 0 means sunday. #### Tags:
return: | day of week, 0=sunday
#### Parameters:
string | $date | (2001/12/28)
[ Top ] ### method isInFuture [line 102]
`bool isInFuture( string $date, [string $time = null])`
tells if the given date(time) is in the future. #### Tags:
access: | public
#### Parameters:
string | $date | (2001/12/28)
string | $time | (24:30:58)
[ Top ] ### method isInLeapYear [line 90]
`void isInLeapYear( mixed $date)`
[ Top ] ### method isInPast [line 117]
`bool isInPast( string $date, [string $time = null])`
tells if the given date(time) is in the past. #### Tags:
access: | public
#### Parameters:
string | $date | (2001/12/28)
string | $time | (24:30:58)
[ Top ] ### method isLeapYear [line 83]
`bool isLeapYear( [mixed $year = null])`
#### Tags:
throws: | null
[ Top ] ### method isValidDate [line 74]
`void isValidDate( int $day, int $month, int $year)`
#### Parameters:
int | $day | (1-31)
int | $month | (1-12)
int | $year | (1-32767)
[ Top ] ### method setNow [line 51]
`void setNow( )`
[ Top ] ### method weekOfYear [line 168]
`integer weekOfYear( string $day, string $month, string $year)`
Returns week of the year, first Sunday is first day of first week #### Tags:
access: | public
#### Parameters:
string | $day | year in format CCYY
string | $month | month in format MM
string | $year | day in format DD
[ Top ] ### method weekOfYear [line 151]
`void weekOfYear( mixed $date)`
[ Top ] Documentation generated on Mon, 29 Dec 2003 21:08:42 +0100 by phpDocumentor 1.2.3