Don't use DateTime . The normal php way of doing this sort of thing is to use date() and strtotime() ; $discount_start_date = '03/27/2012 ... ... <看更多>
Search
Search
Don't use DateTime . The normal php way of doing this sort of thing is to use date() and strtotime() ; $discount_start_date = '03/27/2012 ... ... <看更多>
This can be any string that PHP's strtotime function can parse: use CodeIgniter\I18n\Time; $myTime = new Time ... ... <看更多>
... I will show you how you can convert a timestamp into any date format you want.Read About strtotime function ... ... <看更多>
DateTime::__construct(): Failed to parse time string #564 ... This is because Grav uses the strtotime() PHP function: ... ... <看更多>
There is probably a way to run the field thru the defined widget to get the proper format.. but it would be more convoluted than just using PhP DateTime methods ... ... <看更多>