Problem with date conversion

10 views
Skip to first unread message

Antoine Beaubien

unread,
Jul 23, 2021, 2:15:23 AMJul 23
to OpenRefine
I've got English date, in French order…

But this:
"13/Jul/2021".toDate('dd/MMM/yyyy')

doesn't work, but this does work:
"13/07/2021".toDate('dd/MM/yyyy')

Is it because I have MacOS setup in French for the Date settings of my system?

This doesn't work:
"13/July/2021".toDate('dd/MMM/yyyy')

But this does…
"13/Juillet/2021".toDate('dd/MMM/yyyy')

Is there a way to specify the date’s language setting for regionalization in my conversions?

Regards,
   Antoine

Message has been deleted

Thad Guidry

unread,
Jul 23, 2021, 7:32:56 AMJul 23
to openr...@googlegroups.com
Hi Antoine,

Yes it can take an optional language tag.

We did have some failing OS X tests and some bugs and Tom graciously fixed them last year.
You can read through them:
https://github.com/OpenRefine/OpenRefine/issues/3026
https://github.com/OpenRefine/OpenRefine/pull/3027



On Fri, Jul 23, 2021 at 1:49 AM Antoine Beaubien <ant...@beaubien.qc.ca> wrote:
This seams to work…
"13/Jul/2021".toDate("dd/MMM/yyyy", "en")

Surprisingly… Maybe because of this Java constructor? SimpleDateFormat(String pattern, Locale locale)

Regards,
   Antoine

--
You received this message because you are subscribed to the Google Groups "OpenRefine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openrefine/94e66ad6-66b6-4275-b059-f81bee86aae3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages