SwiftDate icon indicating copy to clipboard operation
SwiftDate copied to clipboard

๐Ÿ” Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.

Results 97 SwiftDate issues
Sort by recently updated
recently updated
newest added

Fixing issue #715 - Now `dateAtEndOf(_: Calendar.Component)` will use `dateAt(_: DateRelatedType)` when `.day` or `.month` are provided to avoid equality incostistency.

Fixing issue #717 - Now one can use .totalSeconds property on Date to get the total number of seconds from the provided time, assuming the hour, minute, and second fields...

Fixing issue #759 - Added new operator method to simplify adding a 'DateInRegion' to a 'Date' object

Hi, I am trying to have the exact date. When I print this `Date().description(with: .current)` it will show in the console this `"Saturday, November 16, 2019 at 1:10:12 AM Pacific...

ex. Locale (zh-Hant) `let localeId = (locale.collatorIdentifier ?? Locales.english.toLocale().collatorIdentifier!) // zh-Hant` case in RelativeFormatterLanguage is "zh_Hant" This case makes it impossible to map the correct `RelativeFormatterLanguage `, and it map...

The docs state this should return the date in the region specified in the ISO string. This is not the case unless I'm missing something. It converts to GMT. ```...

To DateInRegionโ€™s dateBySet uses era. When iOS's System Calendar setting is Calendars.japanese. `Heisei 31-4-20` is `2019-4-20` but DateInRegion.date convert output to `2049-4-20`.

When you use toIntervalString / toClock methods - zero formatting behavior isn't working, because it isn't applying to func sharedFormatter() -> DateComponentsFormatter. Method don't do this: ``` public func apply(toFormatter...

Fixes a bug when after initializing the `TimePeriodChain` class, the `start` and `end` properties are `nil`.

Hi, when compiling with Linux I get this error (using version 6.1 and Swift 5): ``` TimeInterval+Formatter.swift:34:38: error: 'DateComponentsFormatter' is unavailable: Not supported in swift-corelibs-foundation public var zeroFormattingBehavior: DateComponentsFormatter.ZeroFormattingBehavior? ^~~~~~~~~~~~~~~~~~~~~~~...