Problem with date conversion

조회수 15회
읽지 않은 첫 메시지로 건너뛰기

Antoine Beaubien

읽지 않음,
2021. 7. 23. 오전 2:15:2321. 7. 23.
받는사람 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

메시지가 삭제되었습니다.

Thad Guidry

읽지 않음,
2021. 7. 23. 오전 7:32:5621. 7. 23.
받는사람 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.
전체답장
작성자에게 답글
전달
새 메시지 0개