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

Date in ##/##/## format being suggested only as YY/MM/DD #665

Closed
martini1992 opened this issue Feb 24, 2021 · 5 comments · Fixed by #666
Closed

Date in ##/##/## format being suggested only as YY/MM/DD #665

martini1992 opened this issue Feb 24, 2021 · 5 comments · Fixed by #666
Labels
bug Something isn't working or in unexpected ways joex affects the joex component

Comments

@martini1992
Copy link

martini1992 commented Feb 24, 2021

So most of my documents are British date format DD/MM/YY and when they are interpreted they are suggested as YY/MM/DD.
For instance 26/01/15 (26th January 2015) is being suggested as 2026/01/15 (15th January 2026).
I'm setting my document language to English when uploading them.

I'm guessing that there will need to be some distinction added for US English and UK English (though there are more international versions of English which may have different standard formats again).

Edit: Originally I referred to an invalid date (31/02/15) because I should wake up before posting issues.

@eikek
Copy link
Owner

eikek commented Feb 24, 2021

This is currently "biased" for US dates. First m/d/y is tried, but d/m/y is added if possible. If that interpretation would lead to a invalid date (and your example is an invalid one, there is no 31.02.2015…?), then other variations are tried.

Edit: Might also look at #561 - since then the date suggestion should include both variants for English documents.

@martini1992
Copy link
Author

martini1992 commented Feb 24, 2021

Yes your correct that's a bad example. It does however still do this with valid dates, I mixed up two examples I had. So the correct date 26/01/15 gets interpreted as 2026/01/15.

Edit: I don't get multiple formats suggested when scanning as English

@eikek
Copy link
Owner

eikek commented Feb 24, 2021

I don't get multiple formats suggested when scanning as English

That is unexpected to me:-). Will look into it. As always in those situations: if you have a document you could share to reproduce this, that would help a lot. But this is of course not always possible, just asking :). Never mind, think I just reproduced it with only this date in a text file.

@eikek eikek added bug Something isn't working or in unexpected ways joex affects the joex component labels Feb 24, 2021
@martini1992
Copy link
Author

Yeah it's a weird one, I couldn't share a document since the only ones I have to test are payslips currently. But I get a lot of paperwork that uses DD/MM/YY date format, are 2-digit years that uncommon in the rest of Europe or the US? It's good you managed to repro so easily :-) hope it's a simple fix.

@eikek
Copy link
Owner

eikek commented Feb 25, 2021

I hope so too :-) But if it's easily reproducible this is already helping a lot! For 2-digit years, can only speak for Germany and Switzerland there I hardly see them. I also don't like it personally, because it confuses my little brain :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or in unexpected ways joex affects the joex component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants