(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();