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

add halfOfYear, isFirstHalfOfYear, IsSecondHalfOfYear; improve getter… #421

Merged
merged 6 commits into from
Sep 19, 2023

Conversation

brenoroosevelt
Copy link
Contributor

I would like to propose the inclusion of the halfOfYear property and the isFirstHalfOfYear and isSecondHalfOfYear methods. The first half of the year corresponds to the first 6 months, while the second half corresponds to the remaining months.

Furthermore, I've made some improvements to the type hinting of the read-only properties in order to specify the numeric range. For example, changing daysInMonth from int to int<1, 31>. This allows for better static code analysis by PHPStan and Psalm.

Thank you in advance.

@brenoroosevelt
Copy link
Contributor Author

@othercorey Changes made. renamed to 'half'

@othercorey othercorey merged commit 7ca7713 into cakephp:3.x Sep 19, 2023
7 checks passed
@othercorey
Copy link
Member

Thanks!

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.

3 participants