0

I have 2 FrozenTime object format and How can i find the difference of those two

Cake\I18n\FrozenTime Object
(
    [time] => 2016-12-27T10:58:11+00:00
    [timezone] => UTC
    [fixedNowTime] => 
)

Another is

Cake\I18n\Time Object
(
    [time] => 2016-12-26T11:35:03+00:00
    [timezone] => UTC
    [fixedNowTime] => 
)

I want to get the difference between those two

tarikul05
  • 1,843
  • 1
  • 16
  • 24
  • 1
    Have you tried splitting the string: "2016-12-27T10:58:11+00:00" into different parts and then compare them? "2016","12","27","11","00","00"? –  Dec 26 '16 at 11:46
  • @IchHabsDrauf bad advice (because string manipulation should be a last resort, not the first thing to do). A frozen time object extends `DateTimeImmutable` - i.e. it's just a datetime object with more functionality. – AD7six Dec 26 '16 at 12:47
  • _A frozen time object extends DateTimeImmutable - i.e. it's just a datetime object with more functionality._ Well, then look for some documentation. –  Dec 26 '16 at 13:04
  • @IchHabsDrauf the point was more that if you want to learn how to change a tyre on a honda civic 5 door special edition, learn/look for simply how to change a tyre on a car - for which there will be a vast amount of info. – AD7six Dec 26 '16 at 17:03

0 Answers0