Working with date and time - Jet\Data_DateTime
PHP itself has a great DataTime class. Jet makes full use of it, and the Jet\Data_DateTime class directly inherits from the PHP \DateTime class - so it can do exactly the same thing and is fully integrated into the Jet platform and is used, for example, in the ORM Jet DataModel. The excellent PHP class \DataTime is only minimally extended, but further extensions (while maintaining compatibility) cannot be ruled out in the future.
Overview of methods
|public static now(
) : static
|Creates an instance and immediately sets the current date and time|
) : void
|Sets whether the object represents only the date.|
) : bool
|Indikuje zda objekt reprezentuje pouze datum.|
) : string
|Converts the date and time to a string in ISO format Y-m-d\TH:i:s, or Y-m-d if the object represents only the date.
This is useful, for example, when storing time data in a database or other storage.
) : string
|The object can be directly converted to a string. When doing so, the toString method is called.|