-
-
Notifications
You must be signed in to change notification settings - Fork 769
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
Day of Week Manipulations #14
Comments
Hi @SimonRice, next/last(.DayOfTheWeek) could be a great addition. Have you already some code about that your it's a feature request? |
That would be correct :) in my example, I in fact continued with your naming convention by using I haven't got any example of next/last day of week - but I'm more than happy to have a go. |
Yeah, I think it could be a great addition and if you have time to work on it now I'll be more than happy to merge your work into the main branch of the library. Otherwise I'll need some time to add these features due to some work commitments into the following two weeks. |
I know that feeling very well - most of my contributions are in my spare time (or in silly hours)! I'll see what I can do within the next 2 weeks - I'd be more than happy to chip in with a Swift project**. ** Besides deleting .DS_Store files ;) |
I'm planning to add it later this week. Meanwhile I'll close this issue; discussion can continue here at issue #45 |
First of all, thank you for the quality library! My date manipulations in Swift not only look more pleasant to read, but they even sound better when reading them to my workmates!
This is just a small addition suggestion - one feature I've had to extend on my own is getting at the beginning and end of the week, based on the current calendar's start of week. I did this in my own codebase by making a public/internal property-based version of
firstWeekDate()
in an extension ofNSDate
. I know there isfirstDayOfWeek
&lastDayOfWeek
, but the start/end of the week may not be in the same month (or year!). You could take this suggestion further by adding a function that returns the next / previous occurring day of the week - e.g.,next(.Monday)
orlast(.Tuesday)
.The text was updated successfully, but these errors were encountered: