Swiftpack.co - kraigspear/SpearDates as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by kraigspear.
kraigspear/SpearDates 1.1.8
Date Utilities
⭐️ 0
🕓 1 week ago
iOS macOS
.package(url: "https://github.com/kraigspear/SpearDates.git", from: "1.1.8")

SpearDates

SpearDates contains date convience routies reducing common that can be repeated in a projects.

Example

In order to get the Month, Day and Year of a date we need to

  1. Create the flags for Month/Day/Year
  2. Get those components from a calendar
  3. Extract each element, checking for nil

This code can be simplifed to

let currentYear = Date().toMondthDayYear().year

Documentation

GitHub

link
Stars: 0
Last commit: 1 week ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Update SwiftFoundation
1 week ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics