Overview of SwiftDate capabilities
masterSwiftDate is a toolkit for parsing, validating, manipulating, comparing, and displaying dates, time, and timezones in Swift. It is compatible with all Apple platforms, Linux, and Swift Server Side frameworks like Vapor or Kitura.
Key features include:
- Date Parsing: Supports custom formats, ISO8601, RSS, and more.
- Date Formatting: Supports colloquial formatters and over 140 languages.
- Date Manipulation: Perform math operations using time units (e.g.,
2.hours + 5.minutes). - Component Extraction: Extract intuitive components like
day,hour,nearestHour, orweekdayNameShort. - Derived Dates: Generate dates like
nextWeek,nextMonth,nextWeekday, ortomorrow. - Date Comparison: Over 20 fine-grained functions such as
isToday,isTomorrow,isSameWeek, andisNextYear. - Codable Support: Full support for Swift's
Codableprotocol. - Random Dates: Generation of random date objects.
- Time Periods: Support for time period calculations and conversions (e.g.,
2.hours.toUnits(.minutes)).