Date
Date
([string $date = null])
adds given or 1 days to date
bool
AddDay
([mixed $days = 1])
returns Date as string in ISO-Format (YYYY-MM-DD)
string
Get
()
returns Date as string in Ami-Format (mm/dd/yyyy)
string
GetAsAmi
()
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
string
GetAsDin
([int $display_null = 1])
-
int
$display_null: display_null
returns Date as string in ISO-Format (YYYY-MM-DD)
string
GetAsIso
()
Returns a string formatted according to the given format string
string
GetAsLcStr
(string $format)
void
GetAsStr
(mixed $format)
returns Date as timestamp
int
GetAsTs
()
returns day in month as int
int
GetDay
()
returns abbreviated month name according to the current locale
int
GetLcMonthAbr
()
returns Month as int
int
GetMonth
()
returns Year as int
int
GetYear
()
checks if date is between date1 and date2
bool
IsBetween
(mixed $date1, mixed $date2)
-
mixed
$date1: date
-
mixed
$date2: date
checks if date is in current month
bool
IsCurrentMonth
()
checks if date is in current month
bool
IsCurrentWeek
()
checks if date is equal to given date
bool
IsEq
([mixed $date = null])
return true if date is Friday, otherwise false
bool
IsFriday
()
checks if date is greater then given date
bool
IsGT
([mixed $date = null])
checks if date is less then or equal to given date
bool
IsLE
([mixed $date = null])
checks if date is less then given date
bool
IsLT
([mixed $date = null])
return true if date is first day in year, otherwise false
bool
IsNewYear
()
return true if date is not 0 (0000-00-00), otherwise false
bool
IsNull
()
return true if date is Sunday, otherwise false
bool
IsSaturday
()
return true if date is Sunday, otherwise false
bool
IsSunday
()
checks if date is today
bool
IsToday
()
Sets date from given date-string, date-object or timestamp-int return true on success, otherwise false
bool
Set
(mixed $date)
void
SetDay
(int $day)
-
int
$day: day of month 0 to 31
Sets date from USA-Format (mm/dd/yyy or m/d/yy)
void
SetFromAmi
(string $datestring)
Sets date from DIN-Format (DD.MM.YYYY or D.M.YY)
void
SetFromDin
(string $datestring)
Sets date from ISO-Format (YYYY-MM-DD)
void
SetFromIso
(string $datestring)
Sets date from timestamp
void
SetFromTs
(int $timestamp)
-
int
$timestamp: timestamp
void
SetMonth
(int $month)
-
int
$month: month 0 to 12
Sets date to first day of week
void
SetToStartOfWeek
([int $start_of_week = 1])
-
int
$start_of_week: start_of_week 0 = Sunnday, 1 = Monday
void
SetYear
(int $year)
-
int
$year: year with century