这个可以根据需要调整 在day  month  hour minute second  等都行

以下是以当前时间戳为基础,调整时间为明天的零点零时零分零秒  可以根据需要 写成毫秒的

+(NSString *)GetTomorrowDay:(NSDate *)aDate
{
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSDateComponents *components = [gregorian components:NSWeekdayCalendarUnit | NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit fromDate:aDate];
[components setDay:([components day]+)]; NSDate *beginningOfWeek = [gregorian dateFromComponents:components];
// // // //
NSDateFormatter *dateday = [[NSDateFormatter alloc] init];
[dateday setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
[dateday stringFromDate:beginningOfWeek];
DLog(@"%@",[dateday stringFromDate:beginningOfWeek]);//年月日 时分秒
// // // //
DLog(@"%@",[NSString stringWithFormat:@"%ld", (long)[beginningOfWeek timeIntervalSince1970]]);//时间戳
return @"";//喜欢用啥 就返回啥吧
}

调用方法  NSLog(@"%@",[self GetTomorrowDay:[NSDate date]]);

最新文章

  1. Codeforces #380 Subordinates(贪心 构造)
  2. JavaScript 数据类型
  3. property animation ( NineOldAndroid )
  4. 关于 android 开发中 debug不能顺利进行的各种问题的总结
  5. tp_link路由器 重新设置
  6. iOS:核心动画之转场动画CATransition
  7. android开发,assets下面的资源文件不会变化/改动
  8. web.xml文件中配置ShallowEtagHeaderFilter需注意的问题
  9. SQL Server 查看数据页面
  10. github--hello,world(参考官网)
  11. Python基础(set集合)
  12. Python函数基础--def及return语句地操作
  13. MySQL数据库优化_索引
  14. Java随机字符串:随机数字字符串,工具类
  15. Failed to load bundle(http://loaclhost:8081/index.bundle?platfrom=ios.....
  16. Linux基础笔记——RAID
  17. (效率低下)77. Combinations C++回溯法 组合
  18. WAF Bypass数据库特性(Oracle探索篇)
  19. NGINX防御CC攻击教程
  20. 2015第六届蓝桥杯C/C++ B组

热门文章

  1. 【VBA】查看窗口当前状态
  2. 正则表达式匹配 href 和text内容
  3. C# 接口的隐式与显示实现说明
  4. 配置YUM源更新源
  5. python socket编程(socket)
  6. nl 命令
  7. linux下apache+php搭建配置记录
  8. nginx的proxy_pass到$host的问题
  9. spring boot配置文件
  10. python之开篇---hello world!