kvyatkovskys / KVKCalendar

A most fully customization calendar for Apple platforms 📅
https://kvyatkovskys.github.io/KVKCalendar/
MIT License
537 stars 118 forks source link

【Important】Fix DateFormatter locale #350

Closed rakuyoMo closed 4 months ago

rakuyoMo commented 4 months ago

In non-US regions, DateFormatter needs to manually set the locale to correspond to the user's device time zone, otherwise the date(from:) method may return nil.

Related question: https://stackoverflow.com/questions/41206810/dateformatter-date-from-string-returns-nil