//
//  NSString+DateFormat.m
//  Gengmei
//
//  Created by Sean Lee on 4/15/15.
//  Copyright (c) 2015 Wanmeichuangyi. All rights reserved.
//

#import "NSString+DateFormat.h"

@implementation NSString (DateFormat)

-(NSDate *)stringFormatToColonDate{
    NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
    [formatter setDateFormat:@"yyyy-MM-dd"];
    return [formatter dateFromString:self];
}

- (NSDate *)stringformatToDashDate{
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateFormat:@"yyyy:MM:dd"];
    return  [dateFormatter dateFromString:self];
}

@end
