-
Notifications
You must be signed in to change notification settings - Fork 3
Add support for ZonedDateTime in EventHandler
#136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add support for ZonedDateTime in EventHandler
#136
Conversation
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
rfc2822
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #135 (comment)
The "parse and catch exception" approach doesn't seem to be a proper solution, at least not in the handle().
I think we should define a separate parseStartDate() method that
- has well-defined inputs and outputs,
- supports the required input formats,
- is tested separately.
Within that method, we should use other methods to determine the input format. If that's really not possible, we can still use the exception method.
lib/src/main/kotlin/at/bitfire/vcard4android/contactrow/EventHandler.kt
Outdated
Show resolved
Hide resolved
lib/src/test/kotlin/at/bitfire/vcard4android/contactrow/EventHandlerTest.kt
Show resolved
Hide resolved
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
|
Should be ready. I've added tests for all formats from AOSP Contacts which should cover the original issue (bitfireAT/davx5-ose#1797 - |
See #135 and bitfireAT/davx5-ose#1797.