TimeSlotsCalculator is a package for dealing with new time slots for electricity in Spain.
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])
import TimeSlotCalculator
let calculator = TimeSlotsCalculator(holidays: [])
let slot = try? calculator.getTimeSlot(for: Date())
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.