db
Date Class Reference

Public Member Functions

 __construct ($timestamp=NULL, $timezone=NULL)
 
 format ($format)
 
 getTimestamp ()
 
 before ($date)
 
 after ($date)
 
 equals ($date)
 
 compareTo ($date)
 

Static Public Member Functions

static createFromFormat ($format, $time, DateTimeZone $timezone=NULL)
 

Detailed Description

trida reprezentujici datum a cas umoznuje vytvoreni z timestamp a z hodin, minut., sekund, dnu, tydnu, mesicu, let

Constructor & Destructor Documentation

◆ __construct()

__construct (   $timestamp = NULL,
  $timezone = NULL 
)

pokud neni zadana timestamp vytvori se datum s aktualnim casem

Parameters
integertimestamp timestamp reprezetujici vytvarene datum

Member Function Documentation

◆ after()

after (   $date)

vraci true, pokud je to datum vetsi nez zadane v pripade za zadana hodnota neni datum vyvolava exception

Parameters
Datedate datum u ktereho se ma zjistit jestli je vetsi

◆ before()

before (   $date)

vraci true, pokud je to datum pred zadanym datem v pripade za zadana hodnota neni datum vyvolava exception

Parameters
Datedate datum u ktereho se ma zjistit jestli je mensi

◆ compareTo()

compareTo (   $date)

the value 0 if the argument Date is equal to this Date; a value less than 0 if this Date is before the Date argument; and a value greater than 0 if this Date is after the Date argument.

◆ createFromFormat()

static createFromFormat (   $format,
  $time,
DateTimeZone  $timezone = NULL 
)
static

◆ equals()

equals (   $date)

vraci true, pokud jsou data stejna v pripade za zadana hodnota neni datum vyvolava exception

Parameters
Datedate datum, ktere se ma porovnat

◆ format()

format (   $format)
Parameters
stringformat format ve stylu php funkce date http://cz.php.net/manual/en/function.date.php a czdate
stringlang jazyk, ktery se ma pouzit
Returns
string formatovane datum podle zadaneho parametru

◆ getTimestamp()

getTimestamp ( )
Returns
integer vraci rok tohoto data
integer vraci mesic tohoto data
integer vraci den tohoto data
integer vraci den tohoto data (bez 0 na zacatku 05 -> 5)
integer vraci hodinu tohoto data
integer vraci minutu tohoto data
integer vraci sekundu tohoto data
integer vraci timestamp odpovidajici tomuto datu

The documentation for this class was generated from the following file: