ANN: Holidays 0.9.1 released and call for contributors

A

Alex Dunae

The Ruby holidays gem has been released and I'm looking for
contributors to help create regional holiday definition files. This
gem provides a set of functions for looking up public holidays around
the world.

A quick example:

require 'holidays'
require 'holidays/ca'

# Lookup Canada Day
date = Date.civil(2007,7,1)
Holidays.by_day(date, :ca)
=> [{:name => 'Canada Day',...}]

# Canada Day is July 1 except when July 1 is a Sunday, then it moves
to
# July 2
date = Date.civil(2007,7,2)
Holidays.by_day(date, :ca, :eek:bserved)
=> [{:name => 'Canada Day',...}]

# Check if this is a holiday in British Columbia, Canada
date.holiday?:)ca_bc)
=> true

There are a lot of countries in the world and contributors are invited
to create or improve a holiday definition file for any region. Sample
definition files can be found at http://code.dunae.ca/svn/holidays/trunk/data/
- get in touch if you would like to help out: alex [at] dunae dot ca.

The project page is here: http://code.dunae.ca/holidays/
The docs are here: http://code.dunae.ca/holidays/doc/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top