所有美国假日列为NSDates [英] List of all American holidays as NSDates

查看:133
本文介绍了所有美国假日列为NSDates的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法,将所有美国假期作为 NSDate 的数组。是否有办法实现?

I'm seeking a way to get all American holidays as an array of NSDates. Is there a way to implement that?

推荐答案


  • 在这里,您会发现带有节假日的RSS资讯。它不会列出年份,但在文档中,您会找到如何更改日期范围的信息。

  • 下载。我建议 ASIHTTPRequest 执行该任务。

    解析RSS提要。你可以通过正常的XML解析,或者使用一个专门的解析器。 MWFeedParser 将是一个选项。

  • 保存日期。通过使用CoreData或 Event Kit Framework

    • Here you'll find RSS-feeds with the holidays. It doesn't list year, but in the docs you'll find information how to change date ranges.
    • Download it. I would suggest ASIHTTPRequest for that task.
      parse the RSS-feed. you can do so by normal XML-parsing, or you use a specialized parser. MWFeedParser would be one option.
    • Save the dates. either by using CoreData, or Event Kit Framework
    • 这篇关于所有美国假日列为NSDates的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆