Skip to content

Add support for "end of the week/month" expressions#134

Merged
mihxil merged 3 commits intomainfrom
copilot/add-end-of-expression-support
Feb 23, 2026
Merged

Add support for "end of the week/month" expressions#134
mihxil merged 3 commits intomainfrom
copilot/add-end-of-expression-support

Conversation

Copy link

Copilot AI commented Feb 23, 2026

The parser recognized "end of this/next week" and "end of this/next month" but failed to parse "end of the week" and "end of the month" — where "the" refers to the current period.

Changes

  • DateParser.g: Added THE WEEK alternative to explicit_relative_week_seek and THE MONTH to explicit_relative_month_seek, both resolving to seek offset 0 (current period), consistent with how THIS/CURRENT prefixes are handled.
  • DateGrammarTest.java: Added AST assertions for end/beginning of the week/month.

Behavior

"end of the week"       → same as "end of this week"
"end of the month"      → same as "end of this month"
"beginning of the week" → same as "beginning of this week"
"beginning of the month"→ same as "beginning of this month"
Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature] Add support for "End of ..."</issue_title>
<issue_description>Allow to parse expressions like

"End of the week"

"End of the month"</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: mihxil <429477+mihxil@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for parsing 'end of' expressions Add support for "end of the week/month" expressions Feb 23, 2026
Copilot AI requested a review from mihxil February 23, 2026 04:44
@mihxil mihxil marked this pull request as ready for review February 23, 2026 22:09
@mihxil mihxil merged commit 338cfa9 into main Feb 23, 2026
6 checks passed
@mihxil mihxil deleted the copilot/add-end-of-expression-support branch February 23, 2026 22: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.

[Feature] Add support for "End of ..."

2 participants