Welcome Guest, Not a member yet? Register   Sign In
Help needed using CI4 I18n Time class.

Hello anyone?
I want to manage date and time using I18n Time Class.
I instantiated the class using "Codeigniter\I18n\Time", and I passed time values to my view file from my controller.
The problem is, on loading the view file, I get the "Class 'Codeigniter\I18n\Time' not found" error.
Any help anyone please?
Thank you.

That's CodeIgniter with a capital "I":

PHP Code:
use CodeIgniter\I18n\Time;
$myTime = new Time('now''America/Chicago''en_US'); 

Source: http://codeigniter.com/user_guide/libraries/time.html
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
(This post was last modified: 06-09-2021, 04:45 AM by BlackBones.)

Thank you @includebeer... what a silly mistake.
Have a good day!

Theme © iAndrew 2016 - Forum software by © MyBB