FronzenTime Example Not Working

hi,

I was messing around with FrozenTime, and notice this. Referring to cake 4 time-docs

In Manipulation, it gives an example of FrozenTime. The example doesn’t work. Only setDate works. Am I missing something ?

$now = FrozenTime::now();
debug( $now );
// Output :object(Cake\I18n\FrozenTime) id:0 {
// 'time' => '2021-06-05 22:15:58.481856+08:00'

$now->year(2013)
	->month(10)
	->day(31);
debug( $now );
// Output : object(Cake\I18n\FrozenTime) id:0 {
// 'time' => '2021-06-05 22:15:58.481856+08:00'

$now = $now->setDate(2013, 10, 31);
debug( $now );
// Output :object(Cake\I18n\FrozenTime) id:0 {
// 'time' => '2013-10-31 22:15:58.481856+08:00'

FrozenTime is immutable, so these function calls do not change the object in question, but rather return a new one with the changes applied to it. The setDate example “works” because it’s assigning the return value back into $now. The example for year, month and day doesn’t do that assignment; you can very easily add it ($now = $new->year(...).

Sounds like the cake4 time-docs example is incorrect. In cake3 time docs, it uses Time rather than FrozenTime (in cake 4 time docs). Do you know why ?

Cake 3:

Cake 4:

Looks like the mutable versions of Date and Time were removed in Cake4, but not quite all the documentation was updated to reflect that.