Skip to content
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

Merged
merged 3 commits into from
Nov 15, 2020

Conversation

grosch
Copy link
Contributor

@grosch grosch commented Nov 14, 2020

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.

@grosch
Copy link
Contributor Author

grosch commented Nov 14, 2020

Fixes issue #285

@richardtop
Copy link
Owner

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:

  1. Remove DateTools from the .podspec file, as to not to include this framework when installing with the CocoaPods
  2. Rewrite sample apps to not use the DateTools. Currently, your pull request doesn't compile with the sample apps (because sample apps use DateTools).
  3. 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.

@grosch
Copy link
Contributor Author

grosch commented Nov 14, 2020 via email

override func loadView() {
calendar = customCalendar
calendar.timeZone = TimeZone(identifier: "Europe/Paris")!
Copy link
Owner

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)!
Copy link
Owner

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

@richardtop richardtop merged commit 5afaf13 into richardtop:master Nov 15, 2020
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.

None yet

2 participants