Welcome Guest, Not a member yet? Register   Sign In
Time diff NOT WORKING
#11

I can only hope that such politicians will come to believe that it is more reasonable to do things an hour earlier rather than redefine a "day".

Yes, you have a valid point. When we compare two dates, it does not matter the hours.
When we compare 2024-03-31 and 2024-04-01, we don't think like this:
2024-04-01 00:00 and 2024-03-31 00:00, the difference is 24 hours, that is one day.

However, the current implementation of Time is such that it can handle comparisons for any time period and time zone.
Reply
#12

It is not easy to know how this implementation should be modified, so I will add a Note to the documentation for now.
https://github.com/codeigniter4/CodeIgniter4/pull/8659
Reply
#13

I sent another PR to fix the behavior:
https://github.com/codeigniter4/CodeIgniter4/pull/8661
Reply
#14
Thumbs Up 

(03-25-2024, 08:10 PM)kenjis Wrote: I sent another PR to fix the behavior:
https://github.com/codeigniter4/CodeIgniter4/pull/8661

Great job, your commitment to the quality of every tiny part of the project is amazing, thanks a lot!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB