                 
                 let dateInFebruary = dateFormatter.dateFromString("2015-02-03 11:24:57")!
                 expect(TimeUnit().daysOfMonth(dateInFebruary)).to(equal(daysInFebruary_2015))
+                expect(TimeUnit.daysOfMonth(dateInFebruary)).to(equal(daysInFebruary_2015))
             }
             
             it ("can create days of February 2012") { // February 2012 was a leap month

            it("returns true for first second of hour") {
                let september13_11AM_2015 = dateFormatter.dateFromString("2015-09-13 11:00:00")! // beginning of 11:00AM September 13th
                expect(TimeUnit().hourContainsDate(september13_11AM_2015, hour:september13_11AM_2015)).to(beTrue())
            }
            
            it("returns true for last second of hour") {
                let september13_11AM_2015 = dateFormatter.dateFromString("2015-09-13 11:00:00")! // beginning of 11:00AM September 13th
                let endOfSeptember13_11AM_2015 = dateFormatter.dateFromString("2015-09-13 11:59:59")!
                expect(TimeUnit().hourContainsDate(endOfSeptember13_11AM_2015, hour: september13_11AM_2015)).to(beTrue())
            }
            
            it("returns true for date in the middle of hour") {
                let september13_11AM_2015 = dateFormatter.dateFromString("2015-09-13 11:00:00")! // beginning of 11:00AM September 13th
                let middleOfSeptember13_11AM_2015 = dateFormatter.dateFromString("2015-09-13 11:30:00")!
                expect(TimeUnit().hourContainsDate(middleOfSeptember13_11AM_2015, hour: september13_11AM_2015)).to(beTrue())
            }
            
            it ("returns true when month date is not beginning of hour") {
                let september13_1130AM_2015 = dateFormatter.dateFromString("2015-09-13 11:30:00")! // 11:30AM September 13th
                let endOfSeptember13_11AM_2015 = dateFormatter.dateFromString("2015-09-13 11:59:59")!
                expect(TimeUnit().hourContainsDate(endOfSeptember13_11AM_2015, hour: september13_1130AM_2015)).to(beTrue())
            }
            
            it("returns false for date in next hour") {
                let september13_1130AM_2015 = dateFormatter.dateFromString("2015-09-13 11:30:00")! // 11:30AM September 13th
                let beginningOfSeptember13_12PM_2015 = dateFormatter.dateFromString("2015-09-13 12:00:00")!
                expect(TimeUnit().hourContainsDate(beginningOfSeptember13_12PM_2015, hour: september13_1130AM_2015)).to(beFalse())
            }
            
            it("returns false for date in previous hour") {
                let september13_1130AM_2015 = dateFormatter.dateFromString("2015-09-13 11:30:00")! // 11:30AM September 13th
                let endOfSeptember13_10AM_2015 = dateFormatter.dateFromString("2015-09-13 10:59:59")!
                expect(TimeUnit().hourContainsDate(endOfSeptember13_10AM_2015, hour: september13_1130AM_2015)).to(beFalse())
                
            }
            

            it ("can calculate the end of an hour for date at the end of the hour") {
                let endOf5PM = dateFormatter.dateFromString("2015-09-08 17:59:59")!
                expect(TimeUnit().endOfHour(endOf5PM)).to(equal(endOf5PM))
                expect(TimeUnit.endOfHour(endOf5PM)).to(equal(endOf5PM))
            }
            
            it ("can calculate the end of an hour for date in the middle of the hour") {
                let endOf5PM = dateFormatter.dateFromString("2015-09-08 17:59:59")!
                let middleOf5PM = dateFormatter.dateFromString("2015-09-08 17:30:00")!
                expect(TimeUnit().endOfHour(middleOf5PM)).to(equal(endOf5PM))
                expect(TimeUnit.endOfHour(middleOf5PM)).to(equal(endOf5PM))
            }
            
            it ("can calculate the end of an hour for date at random time within the hour") {
                let endOf5PM = dateFormatter.dateFromString("2015-09-08 17:59:59")!
                let randomTimeIn5PM = dateFormatter.dateFromString("2015-09-08 17:46:12")!
                expect(TimeUnit().endOfHour(randomTimeIn5PM)).to(equal(endOf5PM))
                expect(TimeUnit.endOfHour(randomTimeIn5PM)).to(equal(endOf5PM))
            }
            
            it ("can calculate the end of a day for date at the end of the day") {
                let endOfSeptember8_2015 = dateFormatter.dateFromString("2015-09-08 23:59:59")!
                expect(TimeUnit().endOfDay(endOfSeptember8_2015)).to(equal(endOfSeptember8_2015))
                expect(TimeUnit.endOfDay(endOfSeptember8_2015)).to(equal(endOfSeptember8_2015))
            }
            
            it ("can calculate the end of a day for date in the middle of the day") {
                let endOfSeptember8_2015 = dateFormatter.dateFromString("2015-09-08 23:59:59")!
                let middleOfSeptember8_2015 = dateFormatter.dateFromString("2015-09-08 12:00:00")!
                expect(TimeUnit().endOfDay(middleOfSeptember8_2015)).to(equal(endOfSeptember8_2015))
                expect(TimeUnit.endOfDay(middleOfSeptember8_2015)).to(equal(endOfSeptember8_2015))
            }
            
            it ("can calculate the end of a day for date at random time within the day") {
                let endOfSeptember8_2015 = dateFormatter.dateFromString("2015-09-08 23:59:59")!
                let randomTimeInSeptember8_2015 = dateFormatter.dateFromString("2015-09-08 17:49:32")!
                expect(TimeUnit().endOfDay(randomTimeInSeptember8_2015)).to(equal(endOfSeptember8_2015))
                expect(TimeUnit.endOfDay(randomTimeInSeptember8_2015)).to(equal(endOfSeptember8_2015))
            }
            
            it ("can calculate the end of a month for date at the end of the month") {
                let endOfSeptember_2015 = dateFormatter.dateFromString("2015-09-30 23:59:59")!
                expect(TimeUnit().endOfMonth(endOfSeptember_2015)).to(equal(endOfSeptember_2015))
                expect(TimeUnit.endOfMonth(endOfSeptember_2015)).to(equal(endOfSeptember_2015))
            }
            
            it ("can calculate the end of a month for date in the middle of the month") {
                let endOfSeptember_2015 = dateFormatter.dateFromString("2015-09-30 23:59:59")!
                let middleOfSeptember_2105 = dateFormatter.dateFromString("2015-09-15 00:00:00")!
                expect(TimeUnit().endOfMonth(middleOfSeptember_2105)).to(equal(endOfSeptember_2015))
                expect(TimeUnit.endOfMonth(middleOfSeptember_2105)).to(equal(endOfSeptember_2015))
            }
            
            it ("can calculate the end of a month for date in the middle of the month") {
                let endOfSeptember8_2015 = dateFormatter.dateFromString("2015-09-30 23:59:59")!
                let randomDateInSeptember_2015 = dateFormatter.dateFromString("2015-09-08 17:51:01")!
                expect(TimeUnit().endOfMonth(randomDateInSeptember_2015)).to(equal(endOfSeptember8_2015))
                expect(TimeUnit.endOfMonth(randomDateInSeptember_2015)).to(equal(endOfSeptember8_2015))
            }
            
            it ("can calculate the end of a year for date at the end of the year") {
                let endOf2015 = dateFormatter.dateFromString("2015-12-31 23:59:59")!
                expect(TimeUnit().endOfYear(endOf2015)).to(equal(endOf2015))
                expect(TimeUnit.endOfYear(endOf2015)).to(equal(endOf2015))
            }
            
            it ("can calculate the end of a year for date in the middle of the year") {
                let endOf2015 = dateFormatter.dateFromString("2015-12-31 23:59:59")!
                let middleOf2015 = dateFormatter.dateFromString("2015-07-01 00:00:00")!
                expect(TimeUnit().endOfYear(middleOf2015)).to(equal(endOf2015))
                expect(TimeUnit.endOfYear(middleOf2015)).to(equal(endOf2015))
            }
            
            it ("can calculate the end of a year for random date within the year") {
                let endOf2015 = dateFormatter.dateFromString("2015-12-31 23:59:59")!
                let randomDateIn2015 = dateFormatter.dateFromString("2015-09-08 17:54:35")!
                expect(TimeUnit().endOfYear(randomDateIn2015)).to(equal(endOf2015))
                expect(TimeUnit.endOfYear(randomDateIn2015)).to(equal(endOf2015))
            }
        }
        
// MARK: - Creating Time Units
