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
bot
17 Things You Can Do in iOS 14 That You Couldn’t Do Before. Say hello to iOS 14, which is rolling out as a free over-the-air software up...
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
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
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
RustemAqtau
Hi! Do you use 3rd party UI inspector tools like Sherlock or Reveal? Which is better?
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

wolf4earth
@AstonJ prompted me to open this topic after I mentioned in the lockdown thread how I started to do a lot more for my fitness. https://f...
New
Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
Exadra37
Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
New
First poster: joeb
The File System Access API with Origin Private File System. WebKit supports new API that makes it possible for web apps to create, open,...
New
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
New