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

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.
Reply
#2

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
Reply
#3
Heart 
(This post was last modified: 06-09-2021, 04:45 AM by BlackBones.)

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




Theme © iAndrew 2016 - Forum software by © MyBB