Skip to content

patch(am): fix ethiopian date in amharic date translator#41

Merged
pythonbrad merged 1 commit into
masterfrom
patch_am_date
Jul 24, 2026
Merged

patch(am): fix ethiopian date in amharic date translator#41
pythonbrad merged 1 commit into
masterfrom
patch_am_date

Conversation

@pythonbrad

@pythonbrad pythonbrad commented Jul 24, 2026

Copy link
Copy Markdown
Member

Change

  • improve the Amharic date translator in fixing the Ethiopian year

Additional changes

  • add more format like the Gregorian ones.

Summary by CodeRabbit

  • New Features

    • Added Ethiopian calendar date conversion based on Gregorian dates.
    • Supports date inputs separated by slashes, dots, or hyphens.
    • Added English and Amharic Gregorian month formats, Ethiopian dates, and ISO-formatted output.
    • Added support for two-digit years and Gregorian leap years.
  • Bug Fixes

    • Improved date validation for invalid formats, months, days, and leap-year boundaries.
    • Invalid dates now return no results instead of incomplete translations.

This commit improve the amharic date translator in fixing the ethiopian
year and in adding more format like the gregorian ones.
@pythonbrad pythonbrad self-assigned this Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 80e0a6cb-092c-4e46-97ca-b992d1fded3b

📥 Commits

Reviewing files that changed from the base of the PR and between 8d60acb and 6328521.

📒 Files selected for processing (1)
  • am/scripts/datetime/date.rhai

📝 Walkthrough

Walkthrough

The date script now parses multiple date separators, validates Gregorian dates, converts them to Ethiopian dates through JDN, and returns expanded Ethiopian, Gregorian, Amharic, and ISO formatted candidates.

Changes

Date translation

Layer / File(s) Summary
Calendar conversion and parsing
am/scripts/datetime/date.rhai
Adds Ethiopian and Gregorian month data, leap-year and month-length validation, Gregorian-to-JDN conversion, JDN-to-Ethiopian mapping, and support for /, ., and - separators.
Validated translation outputs
am/scripts/datetime/date.rhai
Validates parsed values, expands two-digit years to 2000–2099, and emits Ethiopian, Amharic, English Gregorian, and zero-padded ISO candidates.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: fixing Ethiopian date handling in the Amharic date translator.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch patch_am_date

Comment @coderabbitai help to get the list of available commands.

@pythonbrad
pythonbrad merged commit a826fcd into master Jul 24, 2026
2 checks passed
@pythonbrad
pythonbrad deleted the patch_am_date branch July 24, 2026 15:58
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.

1 participant