SwiftDate

🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.

MIT License

Stars
7.6K
Committers
133

Bot releases are visible (Hide)

SwiftDate - 7.0.0 Latest Release

Published by malcommac about 2 years ago

Released on 2022-09-12

CHANGES

  • Removed RelativeTimeFormatter and replaced with built-in system class
  • Fixed compatibility issues on SPM

This version require at least Swift 5.5, iOS 13+, macOS 10.15+, watchOS 6+, tvOS 13+.

SwiftDate - SwiftDate 6.3.1 - (Swift 5.x+)

Published by malcommac almost 4 years ago

Released on 2020-11-22

CHANGES

  • #763 [FIX] Minimum deployment target for iOS is set to 9.0 and tvOS to 9 for Carthage builds
SwiftDate - SwiftDate 6.3.0 - (Swift 5.x+)

Published by malcommac almost 4 years ago

Released on: 2020-11-16

CHANGES

  • #753 [NEW]: Added added .dateMixed format options to toString() method to format dateTime with differing date and time styles.
  • #751 [NEW]: Added support for SPM 5.3 and Package.swift to support Xcode 12 and iOS9+.
  • #728 [NEW]: Added support Swift Package .automatic, .static and .dynamic linking support in order to share same package between multiple targets.
  • #727 [NEW] Added .asLocale() to String object to transform identifier in an NSLocale objectS.
  • #762 [FIX]: CocoaPods: Update podspec to iOS9 in order to fix Xcode 12 warning.
  • #760 [FIX]: Minor fixes to documentation and updated to 6.3.0.
  • #752 [FIX]: Avoid force unwrap in sharedOrdinalNumberFormatter.
SwiftDate - SwiftDate 6.2.0 - (Swift 5.x+)

Published by malcommac about 4 years ago

Released on: 2020-09-16

CHANGES

  • [NEW #694] Added support forDate position between 2 dates range (positionInRange)
  • [NEW #695] Added support for Swift Package Manager (SwiftPM) 5.1
  • [NEW #742] Added support for non latin Serbian localization
  • [FIX #749] Fixed a crash with force unwrap in TimeInterval+Formatter
  • [FIX #726] Fixed date comparison using the .isSameMonth option
  • [FIX #725] Fixed wrong timezone while setup a different SwiftDate.defaultRegion
  • [FIX #710] Fixed grammar for Slovak translation
  • [FIX #708] Fix typo in customFormatter of DataRepresentable
  • [FIX #707] Fixes traditional Chinese translation
  • [FIX #700] Fixed wrong behavior of dateAt(.startOfMonth)
SwiftDate - SwiftDate 6.1.0 - (Swift 5.x+)

Published by malcommac about 5 years ago

Released on: 2019-09-13

CHANGES

  • #682 - [FIX] Fixed Japanese relative datetime formatting.
  • #693 - [FIX] Fixed wrong result when subtracting DateInRegion dates.
  • #676 - [NEW] Added difference() and differences() methods to get the difference between two dates expressed in variuous time components with respect to the other date as a positive integer.
  • #676 - [NEW] Added dateAt(dayOfMonth:monthNumber:yearNumber:) method to returns the date on the given day of month preserving smaller components.
  • #676 - [NEW] Added dateAfter(weeks:on:) method to returns the date after given number of weeks on the given day of week.
  • #676 - [NEW] Added next(:withWeekOfMonth:andMonthNumber:) method to returns next date with the given weekday and the given week number.
  • #676 - [NEW] Added next(dayOfMonth:monthOfYear:) method to returns the next day of month preserving smaller components (hour, minute, seconds).
SwiftDate - SwiftDate 6.0.3

Published by malcommac over 5 years ago

Released on: 2019-05-12

CHANGES

  • #670 [FIX] FixedtoISODate() which ignores explicitly passed Region instance. Now if region is passed it overrides any parsed timezone from ISO source string.
  • #668 [FIX] Fixed missing zero padding with toClock() on the first digit.
  • #652 [FIX] Resolved slow compiling times: moved RelativeFormatter's languages files to json. This currently breaks Linux compatibility because SPM does not support bundled resources.
  • #666 [NEW] Added dateAt(weekdayOrdinal:weekday:monthNumber:yearNumber:) nextWeekday() to both Date and DateInRegion
SwiftDate - SwiftDate 6.0.2

Published by malcommac over 5 years ago

Released on: 2019-04-16

Changes

  • #656 Fixed for ISOFormatter options withoutTZSeparators which produces empty string results if not paired with withInternetDateTimeExtended
  • #653 TimeInterval.ComponentsFormatterOptions reverted to public visibility
  • #635 Better handling for language fallback in relative date formatter
  • #654 Fixed an issue when compiling library on Linux using round function (glib/darwin)
  • #658 Fixed httpFormat format which are not valid for Unicode Technical Reference #35
SwiftDate - SwiftDate 6.0.1 (Swift 5.0+)

Published by malcommac over 5 years ago

Released on: 2019-03-28

Changes

  • #650 Fixes for RelativeFormatter.Style visibility outside the library
SwiftDate - SwiftDate 6.0.0 (Swift 5.0+)

Published by malcommac over 5 years ago

Released on: 2019-03-27

Changes

  • #648 Swift 5 / Xcode 10.2 Compatibility
  • #642 Wrong toISO() output parsing date string from non Gregorian calendars
  • #643 Parsing ISO-8601 formatted week dates fails
  • #646 Relative date formatting never returns the "previous" value (now supports past/future/current)
  • #638 Added RoundingStrategy for RelativeFormatter.Gradation.Rule
  • #647 HTTP Header formatter fix
SwiftDate - SwiftDate 5.1.0 (Swift 4.0+)

Published by malcommac over 5 years ago

Released on: 2019-01-20

Changelog

  • #622 Added enumeration methods to get dates for a specified weekday in a date range (see 3.12 section in documentation)
  • #634 Added Month and Year structures with circular operation support (ie. you can remove two days from monday and you got saturday or add two months to november to get january). All of these structures along with Weekday support localized display of the represented value.
  • #623 Fixed ambiguos operator error when subtracting a Date with TimeInterval
  • #626 Fixed ISO 8601 output when current calendar is not Gregorian
  • #627 Added Asia/Saigon in Zones enumeration
  • #631 Fixed RealtiveFormtter's toRelative() methods when no quantifier is available
  • #629 Fixed heuristic date guessing inside the formatter which prevents discovering wrong date
  • #628 Fixed ISO8601 output when printing date along with complete time
  • #619 Fixed a bug with isInRange where orEqual parameter is not passed correctly
  • #610 Refactoring to remove un-necessary self
SwiftDate - SwiftDate 5.0.13

Published by malcommac almost 6 years ago

Released on: 2018-10-28

Changes

  • #555 Deprecated toString() of TimeInterval/Double to use toIntervalString() (in order to avoid ambiguity)
  • #611 Removed arc4random_uniform to use new Swift 4.2 random APIs
  • #568 Add Linux support to SwiftDate (see notices on documentation)
SwiftDate - SwiftDate 5.0.12

Published by malcommac almost 6 years ago

Released on: 2018-10-26

Changes

  • #521 weekdayName(), eraName(), quarterName() allows to specify locale overwrite to region's locale
  • #596 Refactoring for hashValue in DateInRegion, fixed compiler error on watchOS target
  • #598 Silenced Xcode 'Conversion to Swift 4.2 is available' warning
  • #608 Fixed crash when using quarterName(.short) with a Date in 4th quarter of the year
SwiftDate - SwiftDate 5.0.11

Published by malcommac almost 6 years ago

Released on: 2018-10-26

Changes

  • #597 Differences between two dates as DateComponents via componentsSince() method in DateInRegion
  • #602 Crash in RelativeFormatter when gradation was not found
  • #606 Added ms parameter to dateBySet() function to alter the milliseconds value of a date
  • #607 Fixed ambiguity for toDate(_:region:) with multiple formats bug
  • #609 isInRange ignores granularity parameter when used with plain Date
SwiftDate - SwiftDate 5.0.10

Published by malcommac about 6 years ago

Released on: 2018-10-08

Changes:

  • #594 Support for arm64_32 architecture in Xcode 10 for Carthage
SwiftDate - SwiftDate 5.0.9 (Swift 4.2+)

Published by malcommac about 6 years ago

Released on: 2018-09-18
Swift: 4.x (4.0 and 4.2 supported)

CHANGES

FIXES

  • #592 Added .calendar and .locale property to configure ComponentsFormatterOptions struct to format TimeInterval values.
  • #588 Fixed some links in Documentation files
  • #585 Fixed .quarter property which return always a zero value
  • #586 Fixed ISO8601 parser crash with certain string configurations
  • #583 Fixed broken links in Manipulate_Date.md documentation file
  • #582 Fixed Decodable support for DateInRegion and compactMap() function.
  • #575 Fallback to language when language+region option for toRelative() function does not exists
  • #573 Fixed DateInRegion(milliseconds:) init to work with actual milliseconds values

ADDITIONS

  • #574 Added customization via ComponentsFormatterOptions object in toString() of TimeInterval formatter (in addition to closure version of the same method)
SwiftDate - SwiftDate 5.0.7

Published by malcommac about 6 years ago

Released on: 08/24/2018

Changes

  • Added toUnit() to TimeInterval to extract single time component from an interval (as companion of toUnits()).
  • Removed calendar argument from toUnit() and toUnits(). Value is taken from reference's date region.calendar
SwiftDate - SwiftDate 5.0.6

Published by malcommac about 6 years ago

Released on: 08/21/2018

Changes

  • #580 Restoring in() function for DateInRegion/Date/TimeInterval; added isInside() for Date/DateInRegion
SwiftDate - SwiftDate 5.0.5

Published by malcommac about 6 years ago

Released on: 04/08/2018

Changes

  • #561 Fixed incorrect preWeek and nextWeek calculation
SwiftDate - SwiftDate 5.0.4

Published by malcommac over 6 years ago

Released on: 18/07/2018

Changes

  • #559 Fixes for Decodable protocol in DateInRegion/Region on Swift 4.2
SwiftDate - SwiftDate 5.0.3

Published by malcommac over 6 years ago

Released on: 2017-07-13

  • #560 - Build failed 5.0.2 due to SwiftLint superfluous rules