Welcome Guest, Not a member yet? Register   Sign In
How can I access the date from an object (new Time('+1 day') ? )
#1

(This post was last modified: 06-22-2021, 05:43 AM by Steven Dev.)

Hello colleagues !

Unable to access "date" from new Time ('+ 1 day').
I try with this code:
Code:
$myTime = new Time('+1 day');
var_dump($myTime->date);

CodeIgniter\I18n\Time Object
(
    [timezone:protected] => DateTimeZone Object
        (
            [timezone_type] => 3
            [timezone] => Europe/Sofia
        )

    [locale:protected] => bg
    [toStringFormat:protected] => yyyy-MM-dd HH:mmConfuseds
    [date] => 2021-06-23 15:39:19.000000
    [timezone_type] => 3
    [timezone] => Europe/Sofia
)
Reply
#2

@Steven Dev,

Maybe this will work better for you... https://stackoverflow.com/questions/1394...-to-a-date
Reply
#3

(This post was last modified: 06-22-2021, 08:59 AM by Steven Dev.)

Thank you @php_rocs realy i can use this.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB