Use `key($day)` instead of `array_keys($day)[0]`