Skip to content

support two-digit year in non-gregorian calendars#1187

Merged
Gallaecio merged 2 commits intoscrapinghub:masterfrom
sm-ghavami:fix-two-digit-year-parser-jalali-hijri
Nov 22, 2023
Merged

support two-digit year in non-gregorian calendars#1187
Gallaecio merged 2 commits intoscrapinghub:masterfrom
sm-ghavami:fix-two-digit-year-parser-jalali-hijri

Conversation

@sm-ghavami
Copy link
Copy Markdown
Contributor

We had an issue with parsing two digit year in non-gregorian calendars. This PR will fix that issue and provide a fix for both jalali and hijri calendars.

Copy link
Copy Markdown
Contributor

@Gallaecio Gallaecio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

I wonder if we should do something similar for Gregorian, but no need to do it here.

@sm-ghavami
Copy link
Copy Markdown
Contributor Author

The primary advantage of this approach over the Gregorian one is its customizability. Everyone can easily extend the parsers and override the handle_two_digit_year method to tailor it to their specific use cases.

@sm-ghavami sm-ghavami requested a review from Gallaecio October 3, 2023 07:44
@sm-ghavami
Copy link
Copy Markdown
Contributor Author

@Gallaecio This PR has been approved but not merged yet. Could you check this please?

@Gallaecio Gallaecio merged commit 3955530 into scrapinghub:master Nov 22, 2023
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