Class Date

Description
Variable Summary
string $century
int $day
int $month
int $year
Method Summary
Date Date ([string $date = null])
bool AddDay ([mixed $days = 1])
string Get ()
string GetAsAmi ()
string GetAsDin ([int $display_null = 1])
string GetAsIso ()
string GetAsLcStr (string $format)
void GetAsStr (mixed $format)
int GetAsTs ()
int GetDay ()
void GetDaysInMonth ()
int GetLcMonthAbr ()
int GetMonth ()
void GetWeek ()
void GetWeekDay ()
int GetYear ()
bool IsBetween (mixed $date1, mixed $date2)
bool IsCurrentMonth ()
bool IsCurrentWeek ()
bool IsEq ([mixed $date = null])
bool IsFriday ()
bool IsGT ([mixed $date = null])
bool IsLE ([mixed $date = null])
bool IsLT ([mixed $date = null])
bool IsNewYear ()
bool IsNull ()
bool IsSaturday ()
bool IsSunday ()
bool IsToday ()
bool Set (mixed $date)
void SetDay (int $day)
void SetFromAmi (string $datestring)
void SetFromDin (string $datestring)
void SetFromIso (string $datestring)
void SetFromTs (int $timestamp)
void SetMonth (int $month)
void SetToStartOfWeek ([int $start_of_week = 1])
void SetYear (int $year)
Variables
string $century (line 43)
  • var: century
int $day (line 28)
  • var: day
int $month (line 33)
  • var: month
int $year (line 38)
  • var: year
Methods
Constructor Date (line 49)
  • since: v1.0
Date Date ([string $date = null])
  • string $date: date
AddDay (line 350)

adds given or 1 days to date

bool AddDay ([mixed $days = 1])
Get (line 75)

returns Date as string in ISO-Format (YYYY-MM-DD)

string Get ()
GetAsAmi (line 178)

returns Date as string in Ami-Format (mm/dd/yyyy)

  • return: date
  • since: v1.0
string GetAsAmi ()
GetAsDin (line 161)

returns Date as string in DIN-Format (DD.MM.YYYY) if display_null = 1/true and IsNull() it returns 00.00.0000 otherwise an empty string

  • return: date
  • since: v1.0
string GetAsDin ([int $display_null = 1])
  • int $display_null: display_null
GetAsIso (line 151)

returns Date as string in ISO-Format (YYYY-MM-DD)

  • return: date
  • since: v1.0
string GetAsIso ()
GetAsLcStr (line 141)

Returns a string formatted according to the given format string

string GetAsLcStr (string $format)
  • string $format: format
GetAsStr (line 120)
void GetAsStr (mixed $format)
GetAsTs (line 185)

returns Date as timestamp

  • return: timestamp
  • since: v1.5
int GetAsTs ()
GetDay (line 82)

returns day in month as int

  • return: day
  • since: v1.0
int GetDay ()
GetDaysInMonth (line 114)
void GetDaysInMonth ()
GetLcMonthAbr (line 130)

returns abbreviated month name according to the current locale

  • return: month
  • since: v1.23
int GetLcMonthAbr ()
GetMonth (line 89)

returns Month as int

  • return: month
  • since: v1.0
int GetMonth ()
GetWeek (line 108)
void GetWeek ()
GetWeekDay (line 102)
void GetWeekDay ()
GetYear (line 96)

returns Year as int

  • return: year
  • since: v1.0
int GetYear ()
IsBetween (line 560)

checks if date is between date1 and date2

  • return: true or false
  • since: v1.18
bool IsBetween (mixed $date1, mixed $date2)
  • mixed $date1: date
  • mixed $date2: date
IsCurrentMonth (line 378)

checks if date is in current month

  • return: true or false
  • since: v1.23
bool IsCurrentMonth ()
IsCurrentWeek (line 393)

checks if date is in current month

  • return: true or false
  • since: v1.23
bool IsCurrentWeek ()
IsEq (line 513)

checks if date is equal to given date

  • return: true or false
  • since: v1.17
bool IsEq ([mixed $date = null])
  • mixed $date: date
IsFriday (line 408)

return true if date is Friday, otherwise false

  • return: true or false
  • since: v1.8
bool IsFriday ()
IsGT (line 536)

checks if date is greater then given date

  • return: true or false
  • since: v1.17
bool IsGT ([mixed $date = null])
  • mixed $date: date
IsLE (line 496)

checks if date is less then or equal to given date

  • return: true or false
  • since: v1.17
bool IsLE ([mixed $date = null])
  • mixed $date: date
IsLT (line 473)

checks if date is less then given date

bool IsLT ([mixed $date = null])
  • mixed $date: date
IsNewYear (line 456)

return true if date is first day in year, otherwise false

  • return: true or false
  • since: v1.10
bool IsNewYear ()
IsNull (line 61)

return true if date is not 0 (0000-00-00), otherwise false

bool IsNull ()
IsSaturday (line 440)

return true if date is Sunday, otherwise false

  • return: true or false
  • since: v1.9
bool IsSaturday ()
IsSunday (line 424)

return true if date is Sunday, otherwise false

  • return: true or false
  • since: v1.9
bool IsSunday ()
IsToday (line 363)

checks if date is today

  • return: true or false
  • since: v1.15
bool IsToday ()
Set (line 195)

Sets date from given date-string, date-object or timestamp-int return true on success, otherwise false

  • return: success
  • since: v1.0
bool Set (mixed $date)
  • mixed $date: date
SetDay (line 231)
  • since: v1.0
void SetDay (int $day)
  • int $day: day of month 0 to 31
SetFromAmi (line 294)

Sets date from USA-Format (mm/dd/yyy or m/d/yy)

  • since: v1.0
void SetFromAmi (string $datestring)
  • string $datestring: date
SetFromDin (line 276)

Sets date from DIN-Format (DD.MM.YYYY or D.M.YY)

  • since: v1.0
void SetFromDin (string $datestring)
  • string $datestring: date
SetFromIso (line 312)

Sets date from ISO-Format (YYYY-MM-DD)

  • since: v1.0
void SetFromIso (string $datestring)
  • string $datestring: date
SetFromTs (line 263)

Sets date from timestamp

  • since: v1.3
void SetFromTs (int $timestamp)
  • int $timestamp: timestamp
SetMonth (line 241)
  • since: v1.0
void SetMonth (int $month)
  • int $month: month 0 to 12
SetToStartOfWeek (line 330)

Sets date to first day of week

  • since: v1.5
void SetToStartOfWeek ([int $start_of_week = 1])
  • int $start_of_week: start_of_week 0 = Sunnday, 1 = Monday
SetYear (line 251)
  • since: v1.0
void SetYear (int $year)
  • int $year: year with century

Documentation generated on Fri, 26 Sep 2003 15:39:38 +0200 by phpDocumentor 1.2.2