Skip to content

falcon283/WallClock

Repository files navigation

WallClock

Build Status CocoaPods Version Carthage Compatible Platform Swift Version GitHub license

WallClock is small framework contains structures suitable for tracking clock progress. It does not take into account the dates.

Description

The main purpose of WallClock is to deal easily with clock units. You can sum or subtract WallClock and compare them. It does not take into account the dates and it's by design. If you are going to compare two distinct clocks in order to say which one is displaying an earlier time you don't need to know the date. You can compare them in an absolute way due to a clock is something that take into account 24 * 3600 seconds. If you think about the clock as a flat timeline and a specific time a point onto the timeline, then you can compare them in an absolute way.

Getting Started Base

let midnight = WallClock.midnight
let clock = WallClock(hours: ClockHours(23), minutes: ClockMinutes(12), seconds: ClockSeconds(45))
let test1 = WallClock(0) == midnight
let test2 = midnight < clock

Installing

CocoaPod

pod 'WallClock'

Carthage

github "falcon283/WallClock"

Authors

  • Gabriele Trabucco

License

This project is licensed under the MIT License - see the LICENSE file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published