开发者

How to discover if some day is a workday

Is there some library, pattern or common way deal with开发者_StackOverflow workdays? I mean, is there some relatively well adopted way to know if some day is a workday and not weekend, holiday etc.?

Also, supposing there is such thing, would it be helpful to discover if the day has some "detail"? For example, here in Brazil we use to work only in the afternoon of the Ash Wednesday. Is there some kind of flexible framework for dealing with such variations?

I could implement this kind of business logic without any difficulty but I would not like to reinvent the wheel and other users suggestions can be helpful. Also, it seems a very recurrent problem.

Thanks in advance!


If you are into Java programming you can use this : Non-working day and Holiday Handler Algorithms


Most people I know use a calendar table for this kind of thing. My table contains info for 80+ countries


Google has some calendars that you probably can use.

Check this out for instance: http://www.google.com/calendar/feeds/en.brazilian%23holiday%40group.v.calendar.google.com/public/basic

You have to use your Google account to browse them and there might be some license limitations on the usage, but the information is there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜