I'm really struggling with dates and timezones. My understanding is Date is independent of timezone and is just a point in time. I'm writing a unit ...
I'm really struggling with dates and timezones. My understanding is Date is independent of timezone and is just a point in time. I'm writing a unit ...
From the docs for DateComponents.weekday Weekday units are the numbers 1 through n, where n is the number of days in the week. For example, in the ...
Why are the last two lines of the output the same? Use NSCalendar to calculate the diff between startTime and endTime, find that the diff between @"2 ...
How can I get a Date object that matches a given time in a given time zone? For example, I want to get the Date that represents the next 3AM CST. I ...
I'm calculating the diff between two Dates: let diff = Calendar.current.dateComponents([.day], from: oldDate, to newDate) and I got a DateComponent ...
30 June 2012 had a leap second. As such it lasted 86401 seconds. However, in the following Swift code, timeInterval is 86400. How come? 🤔 let format ...
How to create an event in a "Group Calendar" using the MS Graph APIs? This is only possible using delegated permission from a Work or School Account. ...
I am doing calendar view for my swift project. I have to pass From Date and To Fate to server. So, As per our design I have to show 2 calendars in UI. ...
I'm working on a calendar view (Cocoa macOS app) that shows the current month. When I try to calculate the week number for a given date, I get differe ...
Hi all I am working on a calendar using NSCalendar. I need to find every Sunday and Monday within the month to change the cell color unlike other day ...
i am trying to list all weeks of a given month like start date 6 sep 2020 end date 12 sep 2020 and if a week is ending in next month it should also d ...
I have tried couple of ways to check if NSDate is in current week: Method 1 Method 2 Now here is the case where I am getting FALSE th ...
Our app works quite a bit with dates, but at this time we only support the Gregorian calendar and an app wide NSCalendar instance is initialized as fo ...
Allover the app I use Date objects that when I NSLog the value it shows me: 2020-05-24 22:00:00 +0000 Which I think locally means the 25th (- 1 for ...
I am working on one of my iOS application where I am needed to add the events on the date, I am trying to achieve the UI result like in bellow screens ...
I have a question about whether an observer for NSCalendarDayChanged can function when the app is in the background. The following code only triggers ...
I am trying to convert Chinese New Years to the Gregorian calendar. But I am running into trouble with iOS because the SDK is returning the year betwe ...
I am getting a list of dates as a service response, where I show a calendar where these dates are marked with dots (example that date has an event.). ...
I have implemented FSCalendar for dates but I need to hide next previous month labels only. I have marked red in image attached for reference. actua ...
I'm trying to set time on a NSDatePicker according to a certain offset that I have in milliseconds. When I set the time, the value that I see is off a ...