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
New A14 chip, first 5nm chip in a mainstream device… In the space race that is CPU and GPU improvements, this is a groundbreaking st...
New
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
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
First poster: bot
Apps on all of Apple’s app stores will now have to reveal what data they collect and what it is used for. Ultimately if the user is un...
New
herminiotorres
Someone uses iPad Pro as a principal device to working? Most like programming stuff in your day-by-day?
New
AstonJ
Doesn’t have to be for coding, but just apps you’ve found useful; :smiley: I think this is great: The thing I like most about it is h...
New
malloryerik
Yeah I’m the kind of shmoe who gets excited about finding a new iOS Org Mode file viewer and editor. This one is done quite well, good fo...
New
RustemAqtau
Hi! Do you use 3rd party UI inspector tools like Sherlock or Reveal? Which is better?
New

Other popular topics Top

ohm
Which, if any, games do you play? On what platform? I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
New
AstonJ
Or looking forward to? :nerd_face:
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
poll poll Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
AstonJ
I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl: The Ser...
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
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1143 25883 760
New
AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New