Swiftpack.co -  Polenoso/TimeSlotCalculator as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Polenoso/TimeSlotCalculator
A package made in Swift to calculate time slots for the new Spain electricity time slots
.package(url: "https://github.com/Polenoso/TimeSlotCalculator.git", from: "1.0.0")

TimeSlotsCalculator

TimeSlotsCalculator is a package for dealing with new time slots for electricity in Spain.

Installation

Use the package manager SPM to add TimeSlotCalculator.

dependencies: [
        .package(url: "https://github.com/Polenoso/TimeSlotCalculator.git", from: "1.0.0"),
    ],
targets:
 .target("yourtarget",
        dependencies: [TimeSlotsCalculator])

Usage

import TimeSlotCalculator

let calculator = TimeSlotsCalculator(holidays: [])

let slot = try? calculator.getTimeSlot(for: Date())

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

GitHub

link
Stars: 0
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

1.0.0
2 weeks ago

This is the very first version of the package.

Includes basic usage to calculate the time slot from a given Date.

Currently it uses the Current device calendar to check whether it's a weekend or not.

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