Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
patchthecode committed Oct 28, 2016
1 parent d51bd14 commit c87bea7
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Sources/GlobalFunctionsAndExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ func delayRunOnGlobalThread(_ delay: Double,
}

extension Date {

static func startOfMonth(for date: Date, using calendar: Calendar) -> Date? {
let dayOneComponents = calendar.dateComponents([.era, .year, .month], from: date)
return calendar.date(from: dayOneComponents)
}

static func endOfMonth(for date: Date, using calendar: Calendar) -> Date? {
var lastDayComponents = calendar.dateComponents([.era, .year, .month], from: date)
lastDayComponents.month = lastDayComponents.month! + 1
Expand All @@ -39,7 +37,6 @@ extension Date {
}

extension Dictionary where Value: Equatable {

func key(for value: Value) -> Key? {
guard let index = index(where: { $0.1 == value }) else {
return nil
Expand Down

0 comments on commit c87bea7

Please sign in to comment.