确定日期是美国假期还是国际假期的最佳免费图书馆或数据库? [英] Best free library or database to determine if a date is a US or international holiday?

查看:15
本文介绍了确定日期是美国假期还是国际假期的最佳免费图书馆或数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了提高年度比较的相关性,我想纠正去年的数据落在复活节、劳动节或其他日期的事实.以编程方式确定此信息的最简单方法是什么?是否有任何已知的解决国际假期的解决方案?我可以抓取像 this one 这样的网站,但我觉得这违反了他们的服务条款.

解决方案

在 Java 世界中,您提到的网站确实支持 API,Instant Holiday Connection,这可能是一个很好的解决方案(比屏幕抓取更好).

<块引用><块引用>

Light Development Holiday Client API 是一个 Java 类库,可将任意其他应用程序与 World Holiday 无缝集成日历服务,让他们了解全球的特殊观察日.

但是,免费版只能访问去年的假期...

<小时>

另一个(更公开的)数据库是 地球日历,免费但没有可见的 API(再次返回屏幕抓取)

<小时>

time and date.com 似乎也有所有假期国家(同样没有可见的 API).

虽然他们确实有一个相当完整的假期列表

In hopes of improving the relevance of year to year comparisons I would like to correct for the fact that the data last year fell on Easter, Labor Day, or whatever. What is the easiest way to programatically determine this information? Are any solutions known to account for international holidays? I could scrape a site like this one but I feel like it is in violation of their terms of service.

解决方案

In the Java world the site you mentioned does comport an API, Instant Holiday Connection, which could be a good solution (better than screen scraping).

The Light Development Holiday Client API is a Java class library to seamlessly integrate arbitrary other applications with the World Holiday Calendar Service to make them aware of special observation days around the globe.

However, the free version only give access to last year Holidays...


Another (more public) database would be Earth Calendar, free but with no visible API (back to screen scraping again)


time and date.com does appear to have also all Holidays for all countries (with again no visible API).

They do have a fairly complete list of Holidays though

这篇关于确定日期是美国假期还是国际假期的最佳免费图书馆或数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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