Skip to content

Files

Latest commit

d60e8b0 · Jul 16, 2018

History

History
33 lines (23 loc) · 623 Bytes

README.md

File metadata and controls

33 lines (23 loc) · 623 Bytes

AZDateBuilder

Build Status

Simple NSDate Builder

Installation

pod 'AZDateBuilder'

Usage

// 2010-1-1 11:10:05
NSDate *date = [NSDate AZ_dateByUnit:@{
    AZ_DateUnit.year : @2010,
    AZ_DateUnit.month : @1,
    AZ_DateUnit.day : @1,
    AZ_DateUnit.hour : @11,
    AZ_DateUnit.minute : @10,
    AZ_DateUnit.second : @5
}];

// 2020-1-1 11:10:05
NSDate *newDate = [date AZ_dateByUnit:@{
    AZ_DateUnit.year : @2020,
}];

LICENSE

MIT