悟空记账

JZTime.h 867B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // JZTime.h
  3. // JIZHANG
  4. //
  5. // Created by kuxuan on 2017/10/24.
  6. // Copyright © 2017年 kuxuan. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface JZTime : NSObject
  10. /**
  11. * 获取时间
  12. * @return NSString精确到秒
  13. */
  14. +(NSString *)getTime;
  15. /**
  16. * 时间转换年月日
  17. */
  18. +(NSString *)getYYMMDDWithDate:(NSDate *)date;
  19. +(NSString *)getYYMMDDWithDate2:(NSDate *)date;
  20. +(NSString *)getYYMMDDHHMMWithDate:(NSDate *)date;
  21. +(NSString *)getYear:(NSDate *)date;
  22. +(NSString *)getMonth:(NSDate *)date;
  23. /**
  24. * 转换字符串时间到显示时间
  25. *
  26. * @param timeString 14xxxxx格式字符串
  27. *
  28. * @return 显示字符串
  29. */
  30. +(NSString *)getTimeFromTimeString:(NSString *)timeString;
  31. +(NSString *)getTimeWithSice1970TimeString:(NSString *)timeString;
  32. +(NSInteger)howManyDaysInThisYear:(NSInteger)year withMonth:(NSInteger)month;
  33. @end