Skip to content

Commit

Permalink
Fixed isNextWeek() and isLastWeek()
Browse files Browse the repository at this point in the history
  • Loading branch information
melvitax committed Jun 24, 2015
1 parent 9e99065 commit ceaf1ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AF+Date+Helper/AF+Date+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ extension NSDate {
{
let interval: NSTimeInterval = NSDate().timeIntervalSinceReferenceDate + NSDate.weekInSeconds()
let date = NSDate(timeIntervalSinceReferenceDate: interval)
return self.isSameYearAsDate(date)
return self.isSameWeekAsDate(date)
}

func isLastWeek() -> Bool
{
let interval: NSTimeInterval = NSDate().timeIntervalSinceReferenceDate - NSDate.weekInSeconds()
let date = NSDate(timeIntervalSinceReferenceDate: interval)
return self.isSameYearAsDate(date)
return self.isSameWeekAsDate(date)
}

func isSameYearAsDate(date: NSDate) -> Bool
Expand Down

0 comments on commit ceaf1ba

Please sign in to comment.