-
Notifications
You must be signed in to change notification settings - Fork 812
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Japenese calendar repeats years so splitting the date by components and then recreating it from the components will not work. Instead use the new interval start and end.
- Loading branch information
1 parent
62501f9
commit c06f0ee
Showing
1 changed file
with
18 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c06f0ee
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.
@patchthecode
I am a macOS developer. Recently we found a crash, which leads our application to crash occasionlly when calling API of Calendar.
The crash log as follow:
Calendar.dateInterval(of:for:) (in libswiftFoundation.dylib) + 512
In our codes:
We guess maybe
isDateInToday/isDateInYesterday
leads to crash.Can you give us some suggestion?
c06f0ee
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.
Since you are posting this under this merge request,
Are you able to tell me which iOS version crashed?
c06f0ee
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.
@patchthecode
Sorry, I didn't explain my problem clearly.
I encountered a strange crash when calling calendar API in my own application.
So, I found your commit. I think maybe Japanese calendar caused our application crash.
Can you share the reproduce steps of this issue to us?
c06f0ee
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.
just to clarify, you want the steps that happened to reproduce the Japanese calendar crash?
If this is what you want then i do not know the steps. The crash was experienced by another user.
And the fix suggester by a developer other than me.