Skip to content

Add full Italian (it) locale support#634

Open
Pixsd wants to merge 4 commits intowanasit:masterfrom
Pixsd:master
Open

Add full Italian (it) locale support#634
Pixsd wants to merge 4 commits intowanasit:masterfrom
Pixsd:master

Conversation

@Pixsd
Copy link
Copy Markdown

@Pixsd Pixsd commented Nov 29, 2025

Summary

This PR adds full Italian language support to chrono-node. Italian locale is based on the English locale structure.

Changes

  • Added new Italian locale (src/locales/it/) with:
    • 14 parsers: casual date/time, weekday, month name, relative dates, time expressions, time units (ago/later/within), slash format, year-month-day
    • 6 refiners: date-time merging, date range merging, year suffix extraction, relative date merging, unlikely format filtering
    • Constants: Italian weekdays, months, ordinal numbers, time units
    • Configuration: strict and casual parsing modes

Supported expressions

Examples of Italian phrases now recognized:

  • domani alle 15:00 → tomorrow at 3pm
  • lunedì prossimo → next Monday
  • il 25 dicembre 2025 → December 25, 2025
  • tra 2 settimane → in 2 weeks
  • 3 giorni fa → 3 days ago
  • il mese prossimo → next month
  • venerdì scorso alle 18:00 → last Friday at 6pm
  • stamattina / stasera → this morning / this evening
  • dopodomani / l'altro ieri → day after tomorrow / day before yesterday
  • un anno e 1 mese fa → 1 year and 1 month ago

Tests

  • Added 20 test files covering all parsers and refiners
  • All 61 tests passing

Exports

  • chrono.it - casual parsing (default)
  • chrono.it.strict - strict parsing mode
@Pixsd Pixsd changed the title Add Italian (it) locale support Nov 29, 2025
@filippozanfini
Copy link
Copy Markdown

@wanasit please merge this pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants