Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakey committed Apr 12, 2018
1 parent 0731347 commit 35e6381
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions JKCategories/Foundation/NSDate/NSDate+JKExtension.m
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,14 @@ + (NSUInteger)jk_weekOfYear:(NSDate *)date {
NSUInteger i;
NSUInteger year = [date jk_year];

NSDate *lastdate = [date jk_lastdayOfMonth];
// NSDate *lastdate = [date jk_lastdayOfMonth];

for (i = 1;[[lastdate jk_dateAfterDay:-7 * i] jk_year] == year; i++) {
for (i = 1;[[date jk_dateAfterDay:-7 * i] jk_year] == year; i++) {

}

// NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
// [dateFormatter setDateFormat:@"'公元前/后:'G '年份:'u'='yyyy'='yy '季度:'q'='qqq'='qqqq '月份:'M'='MMM'='MMMM '今天是今年第几周:'w '今天是本月第几周:'W '今天是今天第几天:'D '今天是本月第几天:'d '星期:'c'='ccc'='cccc '上午/下午:'a '小时:'h'='H '分钟:'m '秒:'s '毫秒:'SSS '这一天已过多少毫秒:'A '时区名称:'zzzz'='vvvv '时区编号:'Z "];
// NSLog(@"%@", [dateFormatter stringFromDate:[NSDate date]]);
return i;
}

Expand Down

0 comments on commit 35e6381

Please sign in to comment.