TimeSourceModel.m 795 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // TimeSourceModel.m
  3. // smartRhino
  4. //
  5. // Created by Android on 2019/12/23.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "TimeSourceModel.h"
  9. @implementation TimeSourceModel
  10. - (NSString *)notSignDate {
  11. if (!_notSignDate) {
  12. _notSignDate = [_timeDate stringByReplacingOccurrencesOfString:@"-" withString:@""];
  13. }
  14. return _notSignDate;
  15. }
  16. - (NSString *)timeWeek {
  17. return [_monthAndDay stringByAppendingString:_timeWeek];
  18. }
  19. - (NSString *)monthAndDay {
  20. if (!_monthAndDay) {
  21. NSArray *times = [_timeDate componentsSeparatedByString:@"-"];
  22. if (times.count >= 3) {
  23. _monthAndDay = [NSString stringWithFormat:@"%ld月%ld日",[times[1] integerValue],[times[2] integerValue]];
  24. }
  25. }
  26. return _monthAndDay;
  27. }
  28. @end