diff --git a/Package.swift b/Package.swift index 89320c3..336c0b5 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.7 +// swift-tools-version: 5.9 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -12,18 +12,13 @@ let package = Package( .watchOS(.v9), ], products: [ - // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: "OversizeCore", targets: ["OversizeCore"] ), ], dependencies: [ - // Dependencies declare other packages that this package depends on. - // .package(url: /* package url */, from: "1.0.0"), ], targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "OversizeCore", dependencies: [] diff --git a/Sources/OversizeCore/Extensions/Swift/Date+Extension.swift b/Sources/OversizeCore/Extensions/Swift/Date+Extension.swift index d1e3442..f92075c 100644 --- a/Sources/OversizeCore/Extensions/Swift/Date+Extension.swift +++ b/Sources/OversizeCore/Extensions/Swift/Date+Extension.swift @@ -30,6 +30,10 @@ public extension Date { Calendar.current.date(byAdding: .day, value: 7, to: noon)! } + var weekBefore: Date { + Calendar.current.date(byAdding: .day, value: -7, to: noon)! + } + var hour: Date { Calendar.current.date(bySettingHour: 1, minute: 0, second: 0, of: self)! } diff --git a/Sources/OversizeCore/ViewModifier/Debug/ColorOverlay.swift b/Sources/OversizeCore/ViewModifier/Debug/ColorOverlay.swift deleted file mode 100644 index 9c0cc0e..0000000 --- a/Sources/OversizeCore/ViewModifier/Debug/ColorOverlay.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright © 2023 Alexander Romanov -// DebugOverlayModifier.swift, created on 24.05.2023 -// - -import SwiftUI - -public struct DebugOverlayModifier: ViewModifier { - public func body(content: Content) -> some View { - content - .overlay(Color.random(randomOpacity: true)) - } -} - -public extension View { - func debugOverlay() -> some View { - modifier(DebugOverlayModifier()) - } -}