Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support creating Chronos from ChronosTime #425

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Conversation

othercorey
Copy link
Member

No description provided.

@othercorey othercorey added this to the 3.x milestone Sep 24, 2023
{
$time = new ChronosTime('20:14:12.123456');
$chronos = new Chronos($time);
$this->assertSame('20:14:12.123456', $chronos->format('H:i:s.u'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also have assertions for the date component of Chronos to help prevent regressions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will always be the current date. I could check that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we special case using the test now date with a ChronosTime time or should it always be the current date?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having a test that it is the current date would be good for future us.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extended tests to compare full Chronos string.

@markstory
Copy link
Member

Looks good. I don't know what is up with psalm.

@othercorey othercorey merged commit b23faf4 into 3.x Sep 29, 2023
6 of 7 checks passed
@othercorey othercorey deleted the chronos-from-chronostime branch September 29, 2023 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants