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

International date formats #20

Open
jggouvea opened this issue Oct 14, 2020 · 1 comment
Open

International date formats #20

jggouvea opened this issue Oct 14, 2020 · 1 comment

Comments

@jggouvea
Copy link

I am a Quora user in English, Portuguese and Spanish. While I have been able to use the script with my English answers, it fails with the answers in other languages because they indicate dates in a quite different way.

I'd be okay to patch the scripts myself (since I only need this once), keeping one version for each language. That's okay because I only need to run the script a few times.

Would you please help me adapt the script so it recognises international dates?

This is the way it is in Portuguese:

less than 24 hours: "Adicionado há 12h"
less than a week: "Adicionado quinta-feira" (the days of the week are "domingo, segunda-feira, terça-feira, quarta-feira, quinta-feira, sexta-feira, sábado")
less than a year "Adicionado 8 de outubro" (the months of the year are "janeiro, fevereiro, março, abril, maio, junho, julho, agosto, setembro, outubro, novembro, dezembro")
more than a year: "Adicionado 30/07/2018" (date format is dd/mm/yyyy and the trailing zero is used).

This is the way it is in Spanish:

less than 24 hours: "Añadido hace 12h"
less than a week: "Añadido viernes" (the days of the week are "domingo, lunes, martes, miércoles, jueves, viernes, sábado, domingo")
less than a year "Añadido el 8 de octubre" (the months of the year are "enero, febrero, marzo, abril, mayo, junio, julio, agosto, septiembre, octubre, noviembre, diciembre")
more than a year: "Añadido el 30/9/2018" (date format is dd/mm/yyyy but the trailing zero isn't used).

@t3nsor
Copy link
Owner

t3nsor commented Oct 30, 2020

Hi, unfortunately I don't have the bandwidth to work on this right now. If you want, you can contribute a patch (ideally it should have a way of detecting the language, and make it easy to extend to additional languages).

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

No branches or pull requests

2 participants