-
Notifications
You must be signed in to change notification settings - Fork 334
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
Removed dependency on DateToolsSwift #286
Conversation
Fixes issue #285 |
Hi, thanks a lot for this pull request. Removing DateTools has been definitely in the consideration.
Really good job and I'm looking forward to merging it as soon as those issues are fixed. |
There ya go.
… On Nov 14, 2020, at 12:59 PM, Richard Topchii ***@***.***> wrote:
Hi, thanks a lot for this pull request. Removing DateTools has been definitely in the consideration.
Overall it looks pretty good. Could you please add the following to your pull request:
Remove DateTools from the .podspec file, as to not to include this framework when installing with the CocoaPods
Rewrite sample apps to not use the DateTools. Currently, your pull request doesn't compile with the sample apps (because sample apps use DateTools).
To simplify the part 2 (rewrite of the apps), feel free to leave just the CustomCalendarExampleController and remove the ExampleController and the ExampleNotificationController.
Really good job and I'm looking forward to merging it as soon as those issues are fixed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#286 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AACNEPWGZQCCE7Q6QNIG6TLSP3VU3ANCNFSM4TVNNSGA>.
|
override func loadView() { | ||
calendar = customCalendar | ||
calendar.timeZone = TimeZone(identifier: "Europe/Paris")! |
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.
Could you please bring back the custom calendar implementation, as it shows how to launch CK and change something else but timezone. E.g. when a completely custom calendar is needed.
@@ -124,24 +79,22 @@ class CustomCalendarExampleController: DayViewController, DatePickerControllerDe | |||
} | |||
|
|||
private func generateEventsForDate(_ date: Date) -> [EventDescriptor] { | |||
var workingDate = date.add(TimeChunk.dateComponents(hours: Int(arc4random_uniform(10) + 5))) | |||
var workingDate = Calendar.current.date(byAdding: .hour, value: Int.random(in: 1...15), to: date)! |
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.
Also, please use your custom calendar here, not the current
one
Not sure how to test this, but I removed the DateToolsSwift package and just used the standard methods Foundation provides. Most of the stuff that library was doing is pretty simple in the newer versions of Swift, so I think it's good to remove that dependency.
Happy to do more work on this.