Skip to content

Conversation

@lucianmocan
Copy link

@lucianmocan lucianmocan commented Jan 31, 2024

fixes #5
When 24-hour time (Locale.current.hourCycle is equal to .zeroToTwentyThree) is toggled ON in Settings, everything works as expected.
When 24-hour time is toggled OFF in Settings (Locale.current.hourCycle is equal to .oneToTwelve), certain Date fields (like dstart, dtend) were nil. To fix that issue, the 'formatter' in DateTimeType needs to be set up as "en_US_POSIX" if 24-hour time is OFF.

… is 12-hour (not 24-hour). If 12 hour then set locale to "en_US_POSIX" else leave it unchanged.
@lucianmocan lucianmocan changed the title fixes #5 support for 12 hour time (hourCycle) Jan 31, 2024
@lucianmocan lucianmocan changed the title support for 12 hour time (hourCycle) support for 12 hour time Locale setting (hourCycle) Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

if not 24-Hour Time, dates are nil

1 participant