naoty / Timepiece

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

How to modify a date. #78

Closed kremizask closed 7 years ago

kremizask commented 7 years ago

First of all thank you for your library. It's been super helpful!

I am upgrading my code to Swift 3 and updated Timepiece from v0.4.3 to the current version and I can't seem to find an method on Date equivalent to change(year:, month:, day:) that was available for NSDate instances.

Is there a recommended way to do this now?

naoty commented 7 years ago

@kremizask Thanks! I implemented similar methods on changed-date branch for https://github.com/naoty/Timepiece/pull/77, which will be merged soon. Would you use this branch until the new version is released?

kremizask commented 7 years ago

That's great! I will!

I assume some other things that are missing like change timezone or beginningOfDay will be added as well? Or are there any apis that you are going to ditch and I should write my own versions of?

naoty commented 7 years ago

@kremizask Now, I'm not going to add those features. Especially timezone feature will be not implemented because it is difficult to implement without bringing any bugs.

naoty commented 7 years ago

@kremizask I will close this issue. But, if your question is not solved yet, I will reopen this.