1

I'm not able to parse very simple hungarian dates with readr::parse_date

parse_date('július 6.', format = '%B %e.', locale = locale('hu'))

even if the month is listed in the locale

> locale('hu')
<locale>
Numbers:  123,456.78
Formats:  %AD / %AT
Timezone: UTC
Encoding: UTF-8
<date_names>
Days:   vasárnap (V), hétfő (H), kedd (K), szerda (Sze), csütörtök (Cs), péntek (P), szombat (Szo)
Months: január (jan.), február (febr.), március (márc.), április (ápr.), május (máj.), június (jún.), július (júl.), augusztus
        (aug.), szeptember (szept.), október (okt.), november (nov.), december (dec.)
AM/PM:  de./du.
Bakaburg
  • 3,165
  • 4
  • 32
  • 64

1 Answers1

0

You need to add a year to the date and specify the encoding.

readr::parse_date("1 július 2000", "%d %B %Y",
           locale = locale(date_names = "hu", encoding = "latin1"))
Jakub.Novotny
  • 2,912
  • 2
  • 6
  • 21