Skip to content

Commit

Permalink
Add weekBefore #path
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanov91 committed Mar 31, 2024
1 parent 69fc62f commit ec11903
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
7 changes: 1 addition & 6 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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: []
Expand Down
4 changes: 4 additions & 0 deletions Sources/OversizeCore/Extensions/Swift/Date+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)!
}
Expand Down
19 changes: 0 additions & 19 deletions Sources/OversizeCore/ViewModifier/Debug/ColorOverlay.swift

This file was deleted.

0 comments on commit ec11903

Please sign in to comment.