Welcome Guest, Not a member yet? Register   Sign In
having problem printing out "created_at" date
#11

(This post was last modified: 09-06-2021, 11:37 AM by ikesela.)

(09-06-2021, 06:58 AM)chakycool Wrote: Tried this and I get a error " Call to a member function getTime() on null"

SYSTEMPATH\I18n\Time.php at line 1168

      *
1162      * @return mixed
1163      * @throws Exception
1164      */
1165    public function humanize()
1166    {
1167        $now  = IntlCalendar::fromDateTime(Time::now($this->timezone)->toDateTimeString());
1168        $time = $this->getCalendar()->getTime();

Other alternative for humanize:

Code:
echo $item->created_at; // this should work out , print_r will print it property
        $new = Codeigniter\I18n\Time::parse($item->created_at);
        echo $new->humanize();
Reply


Messages In This Thread
RE: having problem printing out "created_at" date - by ikesela - 09-06-2021, 11:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB