# malcommac/swiftdate

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/malcommac-swiftdate).**

7,703 stars · 774 forks · Swift · MIT

## Links

- GitHub: https://github.com/malcommac/SwiftDate
- awesome-repositories: https://awesome-repositories.com/repository/malcommac-swiftdate.md

## Description

SwiftDate is a date manipulation library for the Swift programming language. It provides a toolkit for parsing, validating, and formatting dates, times, and timezones.

The library includes a relative time generator for producing date offsets based on reference points such as tomorrow or next week, and a localized date formatter for transforming date objects into human-readable strings across multiple languages and locales. It also features an ISO8601 date parser to convert standardized date strings from SQL, HTTP, and ISO8601 formats into structured objects, alongside tools for managing timezones across different geographical regions.

Broad capabilities cover date arithmetic and value adjustment, chronological comparison, and regional date conversion. The project also provides utilities for date component extraction, random date generation for testing, and the management of time periods and intervals.

The library supports the serialization and deserialization of date and region information for data storage and network transmission.

## Tags

### Data & Databases

- [Date Manipulation Utilities](https://awesome-repositories.com/f/data-databases/date-manipulation-utilities.md) — Provides a comprehensive toolkit for date arithmetic, adding or subtracting time units, and calculating durations in Swift.
- [Date and Time Libraries](https://awesome-repositories.com/f/data-databases/date-and-time-libraries.md) — Provides a comprehensive toolkit for adding or subtracting time units like hours, minutes, and days. ([source](https://github.com/malcommac/swiftdate#readme))
- [Arithmetic Logic](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/date-component-extractors/arithmetic-logic.md) — Provides a structured unit-based system for calculating new dates by applying offsets to specific time components.
- [Numeric and Date Formatting](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/internationalization/numeric-and-date-formatting.md) — Transforms date and time objects into human-readable strings according to regional localization and layout requirements. ([source](https://github.com/malcommac/swiftdate#readme))
- [ISO8601 Serialization](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/iso8601-serialization.md) — Supports encoding and decoding of date objects using the ISO8601 international standard for consistent data representation.
- [Standard Format Recognizers](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/standard-format-recognizers.md) — Automatically recognizes major date formats like ISO8601, SQL, and HTTP to create structured date objects. ([source](https://github.com/malcommac/swiftdate#readme))
- [Fluent Date Processing](https://awesome-repositories.com/f/data-databases/fluent-date-processing.md) — Implements a fluent API wrapper around native date types to enable more readable and intuitive date manipulation through method chaining.
- [Chronological Comparisons](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/chronological-comparisons.md) — Provides capabilities to determine chronological relationships between dates, including checks for identical days. ([source](https://github.com/malcommac/swiftdate#readme))
- [Date Component Extractors](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/date-component-extractors.md) — Retrieves specific individual components of a date, such as the weekday or hour, for use in application logic. ([source](https://github.com/malcommac/swiftdate#readme))
- [Interval Comparisons](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/interval-comparisons.md) — Determines the chronological order between different points in time and adjusted intervals. ([source](https://github.com/malcommac/swiftdate#readme))
- [Reference Date Derivations](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/reference-date-derivations.md) — Provides functionality to create new dates based on a specific reference point using predefined generation functions. ([source](https://github.com/malcommac/swiftdate#readme))
- [Regional Conversions](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/regional-conversions.md) — Transforms dates from one calendar, locale, or timezone to another while preserving the expressed value. ([source](https://github.com/malcommac/swiftdate#readme))
- [Regional Date Creations](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/regional-date-creations.md) — Allows generating date objects from strings or components while specifying target timezones, calendars, and locales. ([source](https://github.com/malcommac/swiftdate#readme))
- [Relative Date Generations](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/relative-date-generations.md) — Creates new date objects based on temporal offsets such as tomorrow, next week, or the next available weekday. ([source](https://github.com/malcommac/swiftdate#readme))
- [Time Period Managements](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/time-period-managements.md) — Implements integrated logic to handle defined spans of time, durations, and intervals. ([source](https://github.com/malcommac/swiftdate#readme))

### Development Tools & Productivity

- [Relative Date Formatting](https://awesome-repositories.com/f/development-tools-productivity/date-and-time-utilities/relative-date-formatting.md) — Displays dates as relative time offsets in multiple languages using customizable styles. ([source](https://github.com/malcommac/swiftdate#readme))
- [Date String Parsers](https://awesome-repositories.com/f/development-tools-productivity/date-and-time-utilities/relative-date-formatting/date-string-parsers.md) — Converts text into date objects by matching input strings against predefined or custom format templates.
- [Localized Formatters](https://awesome-repositories.com/f/development-tools-productivity/date-formatting-utilities/human-readable-formatters/localized-formatters.md) — Transforms date and time objects into human-readable strings across multiple languages and locales.
- [Relative Date Generators](https://awesome-repositories.com/f/development-tools-productivity/date-and-time-utilities/relative-date-generators.md) — Produces dates and time offsets based on natural language reference points like tomorrow or next week.
- [Duration Interval Calculators](https://awesome-repositories.com/f/development-tools-productivity/duration-formatters/duration-interval-calculators.md) — Provides utilities for computing the precise differences and spans of time between two date points.

### Software Engineering & Architecture

- [Timezone Management](https://awesome-repositories.com/f/software-engineering-architecture/timezone-management.md) — Manages and converts time across different geographical regions and offsets to ensure global accuracy. ([source](https://github.com/malcommac/swiftdate#readme))
- [Date Validation](https://awesome-repositories.com/f/software-engineering-architecture/runtime-value-validation/date-validation.md) — Provides validation checks to verify that date strings match expected formats and are chronologically valid. ([source](https://github.com/malcommac/swiftdate#readme))

### User Interface & Experience

- [Locale-Aware Value Formatting](https://awesome-repositories.com/f/user-interface-experience/value-formatting-tags/locale-aware-value-formatting.md) — Transforms date objects into human-readable strings based on regional locales and calendar settings.

### Web Development

- [Internationalized Date Formatting](https://awesome-repositories.com/f/web-development/internationalized-date-formatting.md) — Converts date objects into human-readable text using colloquial styles and multi-language support. ([source](https://github.com/malcommac/swiftdate#readme))

### Programming Languages & Runtimes

- [Relative Date Generators](https://awesome-repositories.com/f/programming-languages-runtimes/relative-date-generators.md) — Produces date offsets and new date objects based on reference points such as tomorrow or next week.

### Part of an Awesome List

- [Date And Time](https://awesome-repositories.com/f/awesome-lists/devtools/date-and-time.md) — Management for date and time objects.
