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

[4.x] Fix single digit month not working on whereMonth #8697

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

arifhp86
Copy link
Contributor

On query builder, when using the whereMonth method to check for equality in month, it currently only works with double-digit months.

This PR fixes the issue.

// Before:
Entry::query()->whereMonth('date', 11)->get() // works
Entry::query()->whereMonth('date', 9)->get(); // does not work (does not provide the right result)

// After:
Entry::query()->whereMonth('date', 11)->get() // works
Entry::query()->whereMonth('date', 9)->get(); // works

@jasonvarga jasonvarga merged commit 8433adb into statamic:4.x Sep 19, 2023
@arifhp86 arifhp86 deleted the fix/single-digit-month branch September 20, 2023 11:13
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