Skip to content

"first day of this year" is not implemented #13530

@niravpateljoin

Description

@niravpateljoin

Description

hello,

I encountered an issue with the following code:

<?php

echo (new DateTimeImmutable('first day of this year 00:00:00'))->format('Y-m-d H:i:s');

Resulted in this output:

2024-02-01 00:00:00

But I expected this output instead:

2024-01-01 00:00:00

Thank you.

PHP Version

PHP 8.2.15

Operating System

Ubuntu 22.04.3

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions