naoty / Timepiece

Intuitive date handling in Swift
MIT License
2.63k stars 147 forks source link

Migrated to Swift 3 #59

Closed skofgar closed 7 years ago

skofgar commented 8 years ago

Current build did not allow me to run tests for macOS, but tvOS and iOS worked fine so far.

There were a lot of changes in NSCalendar to Calendar. Please review NSCalendar+Timepiece.swift

I also added some localization functionality (for me it was a bug, that's why I fixed it), so that a date can be converted into a string in any other language (based on Locale). I also added the ability to convert a string of a date given in another language (based on Locale) into a Date (Commits: https://github.com/naoty/Timepiece/pull/59/commits/b3da1681f0eea87d0d5f6c7d210d8101047c71e1, https://github.com/naoty/Timepiece/pull/59/commits/7fb814ddedc56033672287f7daee11c8d64fa9d1). This is helpful if e.g. a date is given in English, but the device of the user is going to display it in another language.

Please review and verify.

reidmain commented 8 years ago

@skofgar are you going to update this for the Xcode 8 GM release? You branch does work fine for me using Carthage but I suspect you may have to update to get Travis to pass.

skofgar commented 7 years ago

@reidmain - sorry about that. I did not understand what was wrong with Travis. It should be fixed now!

reidmain commented 7 years ago

ping @naoty

chrux commented 7 years ago

pls @naoty, if everything is ok :) let's merge it

dauz95 commented 7 years ago

pls @naoty merge it!!

skofgar commented 7 years ago

@chrux @naoty : if you temporarily want to use mine, until @naoty fixes it, or merges mine, feel free to do so using: pod 'Timepiece', :git => 'https://github.com/skofgar/Timepiece.git', :branch => 'swift3'

naoty commented 7 years ago

@skofgar Thank you for sending this pull request, and sorry for very late reply. I want merge this PR, but it seems to conflict. Would you fix it?

skofgar commented 7 years ago

@naoty that conflict is new. I will look into it asap.

skofgar commented 7 years ago

@naoty I fixed it. It was a merge conflict in the Timepiece.xcodeproj/project.pbxproj-file, because we are addressing different Swift versions your master is aiming to support Swift 2.3. My branch is for Swift 3. Please be aware of that when merging.

reidmain commented 7 years ago

@skofgar great job.

@naoty would love a merge and a release. This is the last dependency I have that doesn't have an official Swift 3 release. I've been pointing to @skofgar's branch and it seems to be doing fine.

naoty commented 7 years ago

@skofgar Thank you for your job!

naoty commented 7 years ago

@reidmain Sorry for late release.

naoty commented 7 years ago

Released 0.6.0 🎉

reidmain commented 7 years ago

Many thanks @naoty and it wasn't late at all. I understand maintaining an open source repo is a lot of work. Thanks for building this!