有人可以给我指一月中的几天源代码吗?
我正在构建需要最少日历的 iOS 应用程序。真的只是一个月中的几天。有没有人遇到过简单的源代码 - c 代码很好 - 当给定月份和年份时可以生成该月的正确日期?
谢谢,
道格
I am building and iOS app that requires a minimal calendar. Just days of the month really. Has anyone come across bare bones source code - c-code is fine - that when given a month and year can generate the correct days of the month?
Thanks,
Doug
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看 IOS 日期和时间编程指南 http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/DatesAndTimes/Articles/dtCalendars.html#//apple_ref/doc/uid/TP40003470-SW1
他们有以下示例,展示了如何从 NSDate 获取星期几:
Have a look at the IOS Date and Time Programming guide http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/DatesAndTimes/Articles/dtCalendars.html#//apple_ref/doc/uid/TP40003470-SW1
They have the following example showing how to get the day of the week from an NSDate:
我发现了这个: http://www.codecogs.com/code/units/date /daysinmonth.php 与谷歌。我不知道你是否可以用它做点什么。可悲的是,你必须在网站上注册才能下载完整的源代码......
I found this: http://www.codecogs.com/code/units/date/daysinmonth.php with google. I don't know if you can do something with it. The sad thing is that you have to register on the site to download the complete source...