You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
2.4 KiB

//
// MOBFDateUtils.h
// MOBFoundation
//
// Created by vimfung on 15-1-19.
// Copyright (c) 2015年 MOB. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
*
*/
@interface MOBFDate : NSObject
/**
*
*
* @param date
*
* @return
*/
+ (NSInteger)fullYearByDate:(NSDate *)date;
/**
*
*
* @param date
*
* @return
*/
+ (NSInteger)monthByDate:(NSDate *)date;
/**
*
*
* @param date
*
* @return
*/
+ (NSInteger)dayByDate:(NSDate *)date;
/**
*
*
* @param date
*
* @return
*/
+ (NSInteger)hourByDate:(NSDate *)date;
/**
*
*
* @param date
*
* @return
*/
+ (NSInteger)minuteByDate:(NSDate *)date;
/**
*
*
* @param date
*
* @return
*/
+ (NSInteger)secondByDate:(NSDate *)date;
/**
*
*
* @param date
* @param format
*
* @return
*/
+ (NSString *)stringByDate:(NSDate *)date
withFormat:(NSString *)format;
/**
*
*
* @param format
* @param dateString
*
* @return
*/
+ (NSDate *)dateWithFormat:(NSString *)format
dateString:(NSString *)dateString;
/**
*
*
* @param format
* @param dateString
* @param locale
*
* @return
*/
+ (NSDate *)dateWithFormat:(NSString *)format
dateString:(NSString *)dateString
locale:(NSLocale *)locale;
/**
*
*
* @param year
* @param month
* @param date
* @param hour
* @param minute
* @param second
*
* @return
*/
+ (NSDate *)dateWithYear:(NSInteger)year
month:(NSInteger)month
date:(NSInteger)date
hour:(NSInteger)hour
minute:(NSInteger)minute
second:(NSInteger)second;
/**
* 0
*
* @return 0
*/
+ (NSTimeInterval)zeroTimeInterval;
@end