zerig / date
Works with DateTime class. Use czech name of Months and Week Days and Format
v1.0.3
2020-05-07 14:24 UTC
Requires
- php: >=5.6.0
This package is auto-updated.
Last update: 2025-04-08 01:46:09 UTC
README
- extends \DateTime class
Works with DateTime class. Use czech name of Months and Week Days and Format
Allows multiple way to create DateTime. Specificly Czech typo of writing
// SQL $date = new \Date\DateTime("2019-08-15 18:30:05"); $date = new \Date\DateTime("2019-08-15"); $date = new \Date\DateTime("18:30"); // CZECH $date = new \Date\DateTime("15. 08. 2019 18:30:05"); $date = new \Date\DateTime("15. 08. 2019"); $date = new \Date\DateTime("18:30"); // iCAL $date = new \Date\DateTime("20190815T183005Z"); // Your own Format $date = \Date\DateTime::createFromFormat('Y-m-d H:i:s', "2019-08-15 18:30:05"); $date->format("d. m. Y H:i:s") => "15. 08. 2019 18:30:05" $date->format("D d. F Y H:i:s") => "PÁ 15. srpna 2019 18:30:05" $date->format("l d. F Y H:i:s") => "Pátek 15. srpna 2019 18:30:05"