how to set SimpleDateFormat W use Monday as the first day of the week instead of Sunday (US default)

Viewed 105

how to set SimpleDateFormat "W" use Monday as the first day of the week instead of Sunday (US default)

I'm trying to extract the week of the month number with F.date_format("dates", "W")

but this would make an observation on the Sunday the first of week 2 instead of the last of week 1

The issue seems to be because simple date format isn't localised and defaults to us/default

Is there a way to set the locale to en/gb for simpleDateFormat to not treat use US defaults

https://issues.apache.org/jira/browse/SPARK-31879

0 Answers
Related