Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daniel00k/feriado_cl
Feriados de Chile
https://github.com/daniel00k/feriado_cl
Last synced: 3 months ago
JSON representation
Feriados de Chile
- Host: GitHub
- URL: https://github.com/daniel00k/feriado_cl
- Owner: daniel00k
- License: mit
- Created: 2015-08-01T23:01:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-31T17:54:19.000Z (about 9 years ago)
- Last Synced: 2024-04-15T03:17:04.462Z (7 months ago)
- Language: Ruby
- Size: 149 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# FeriadosCl
Obtiene los feriados desde la página www.feriados.cl y obtiene los feriados que son generales, no retorna los que son específicos de algunas regiones o de algunas instituciones.
## Installation
Add this line to your application's Gemfile:
gem 'feriados_cl'
And then execute:
$ bundle
Or install it yourself as:
$ gem install feriados_cl
## Basic Usage
feriados = FeriadosCl::FetchData::Fetcher.new
dates = feriados.get_dates
Example result: [2015-01-01 00:00:00 -0300, 2015-04-03 00:00:00 -0300, 2015-04-04 00:00:00 -0300, 2015-05-01 00:00:00 -0300, 2015-05-21 00:00:00 -0300, 2015-06-29 00:00:00 -0300, 2015-07-16 00:00:00 -0300, 2015-08-15 00:00:00 -0300, 2015-09-18 00:00:00 -0300, 2015-09-19 00:00:00 -0300, 2015-10-12 00:00:00 -0300, 2015-10-31 00:00:00 -0300, 2015-11-01 00:00:00 -0300, 2015-12-08 00:00:00 -0300, 2015-12-25 00:00:00 -0300]
To see the results on an easier way:
dates.each{|d| puts d.strftime("%d de %B del %Y")}
01 de January del 2015
03 de April del 2015
04 de April del 2015
01 de May del 2015
21 de May del 2015
29 de June del 2015
16 de July del 2015
15 de August del 2015
18 de September del 2015
19 de September del 2015
12 de October del 2015
31 de October del 2015
01 de November del 2015
08 de December del 2015
25 de December del 2015