Swiftpack.co - pdat-cz/PDFormatStyle as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by pdat-cz.
pdat-cz/PDFormatStyle 1.0.0
Swift: FormatStyle
⭐️ 0
🕓 2 years ago
iOS macOS tvOS
.package(url: "https://github.com/pdat-cz/PDFormatStyle.git", from: "1.0.0")

PDFormatStyle

FormatStyle for Date

import PDFormatStyle

Date().formatted(.yearPeriod())
"2021"

Date().formatted(.monthPeriod()) 
"2021-12"

Date().formatted(.dayPeriod() )   
"2021-12-31"

Date().formatted(.dayPeriod(timezone:"Europe/Prague))   
"2021-01-01"

Date().formatted(.hourPeriod()) 
"15:35"

GitHub

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

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