SwiftDate
SwiftDate copied to clipboard
🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.
When using the `.toFormat()` formatter, I'm experiencing a significant impact on performance. As far as I can see in the documentation, a `sharedFormatter` should be the default formatter, if a...
Today is Aug 26 for me, so let's say I have the following: ``` if let date = "2020-08-27T09:00:00Z".toISODate(region: Region.ISO) { let m = date.toRelative(since: DateInRegion(), style: RelativeFormatter.defaultStyle()) print(m) }...
The `struct Region` basically stores a `Calendar` instance, while the `DateInRegion` stores an instance of `Region`. My question is based on an assumption that an instance of `Calendar` is not...
Is this possible to get difference between two dates with this lib? I need something like "2 hours ago" etc. and how to do it?
I'm following the migration guide. Sadly the documentation is broken at this point. "nextWeekend, previou" How can I access the previousweekend? Thanks
I tried to calculate the difference in dates using `(date1 - date2).in(.day)` but some values are not correct. I'm running Swift 5.2 with Xcode 11.4. I ran the tests on...
PLS :)
The docs on https://github.com/malcommac/SwiftDate/wiki/1.-Introduction:-Absolute-Date-and-DateInRegion says > let dateFormat = "yyyy-MM-dd HH:mm" let current_default = Date.defaultRegion // Print date in current local device region print(now.string(format: .custom(dateFormat))) // 2017-04-09 19:32 // Change...
SwiftDate pod provides good functionality to set default locale, but this doesn't cover formatters and I have to specify locale every time I create any. Is there any way to...
Is there any way to get the total second of given time? for example 01:06 // mm:ss returns 66 seconds? Thanks