Latest 1.1.0
Homepage https://github.com/Meniny/Today
License MIT
Platforms ios 8.0, osx 10.10, tvos 9.0, watchos 2.0
Frameworks Foundation
Authors

Today

VersionAuthorBuild PassingSwift
PlatformsMIT
CocoapodsCarthageSPM

What’s this?

Today is a tiny library to make using Date easier. Written in Swift.

Requirements

  • iOS 8.0+
  • macOS 10.10+
  • watchOS 2.0+
  • tvOS 9.0+
  • Xcode 9 with Swift 4

Installation

CocoaPods

use_frameworks!
pod 'Today'

Contribution

You are welcome to fork and submit pull requests.

License

Today is open-sourced software, licensed under the MIT license.

Sample

import Today

func test() {
  let now = Date()
  print("now: (now)")
  print("now.isToday: (now.isToday)")
  print("now.isWeekend: (now.isWeekend)")
  print("now is: (now.weekdayName.name)")

  let nextDay = now.adding(days: 1)
  print("nextDay: (nextDay)")
  print("nextDay.isTomorrow: (nextDay.isTomorrow)")

  let later = Today.compare(date: nextDay, ifLater: now)
  print("nextDay is isLaterThan now: (later)")

  let todayInNextYear = Today.dateByAdding(1, of: .year, to: now)
  print("todayInNextYear: (String(describing: todayInNextYear))")
}

Latest podspec

{
    "name": "Today",
    "version": "1.1.0",
    "summary": "A tiny library to make using Date easier.",
    "homepage": "https://github.com/Meniny/Today",
    "license": "MIT",
    "authors": {
        "Elias Abel": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Meniny/Today.git",
        "tag": "1.1.0"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "source_files": "Today/*/*.{swift,h}",
    "module_name": "Today",
    "public_header_files": "Today/**/*.h",
    "resources": "Today/Resources/Today.bundle",
    "frameworks": "Foundation",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This