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

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

问题描述

为了提高年度比较的相关性,我想纠正一个事实,即去年的数据是复活节,劳动节或其他任何事情。以编程方式确定此信息最简单的方法是什么?有没有解决国际假期的解决方案?我可以刮一个像这个的网站,但我觉得这违反了他们的服务条款。

解决方案

在Java世界中,您提到的网站确实符合API, 即时假日连接 ,这可能是一个很好的解决方案(比屏幕刮取更好)。



Light Development Holiday Client API是一个Java类库,用于将任意其他应用程序与 世界假日日历服务 ,使他们了解全球各地的特殊观察日。



然而,免费版只允许访问去年假期...






另一个(更公开)的数据库将是 地球日历 ,免费但没有可见的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天全站免登陆