RustemAqtau

RustemAqtau

How to convert iOS date to Rrule format?

How to convert time recurrence(daily, weekly, monthly, etc) to Rrule format and send to backend? Ex:

"rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR"

Do you using libraries for this in Swift?

Most Liked

godofbiscuits

godofbiscuits

It depends on where you’re getting your recurrences from? I don’t recall any Apple-specific recurrence mechanisms on the level of calendars like you’re describing. But eventually if you have date objects, you’ll want to use DateComponents to extract the kind of data you’re describing (I don’t know what RRules are)
How you get a DateComponents object is below. See the docs for how to extract the individual months, days etc.

let date = Date()
var calendar = Locale.current.calendar
var dateComponents = calendar.dateComponents(Set<Calendar.Component>(), from: date)

Where Next?

Popular Ios topics Top

AstonJ
How did they do? Any tips? I’m personally itching to do an iOS app and I’m sure many others will be equally interested in hearing your t...
New
AstonJ
Are there any improvements you think Apple could make to make things easier?
New
AstonJ
Since a few of us seem to be interested in learning Swift, I wondered what languages or frameworks people are (or thinking about) pairing...
New
New
bot
Learn about iOS 14’s new group messaging features that make long conversations easier to manage with threads and how to add more personal...
New
bot
Apple’s Swift has far-reaching effects on all platforms, not just iOS, OS X, watchOS, and tvOS. Learn why Swift matters, how to use the p...
New
New
AstonJ
New iPhones incoming… probably with 5G. Any other guesses? Anyone going to be watching it? 10 AM PDT 5 PM GMT 6 PM UK
New
herminiotorres
Someone uses iPad Pro as a principal device to working? Most like programming stuff in your day-by-day?
New
RustemAqtau
How to convert time recurrence(daily, weekly, monthly, etc) to Rrule format and send to backend? Ex: "rrule": "FREQ=WEEKLY;BYDAY=MO,TU,W...
New

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
New
Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
AstonJ
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
PragmaticBookshelf
Tailwind CSS is an exciting new CSS framework that allows you to design your site by composing simple utility classes to create complex e...
New
AstonJ
If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New
New
mafinar
This is going to be a long an frequently posted thread. While talking to a friend of mine who has taken data structure and algorithm cou...
New
AnfaengerAlex
Hello, I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New