bjeanes-holidays 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +15 -0
- data/LICENSE +21 -0
- data/README.rdoc +77 -0
- data/REFERENCES +16 -0
- data/data/SYNTAX +111 -0
- data/data/au.yaml +111 -0
- data/data/build_defs.rb +152 -0
- data/data/ca.yaml +141 -0
- data/data/de.yaml +111 -0
- data/data/dk.yaml +117 -0
- data/data/es.yaml +161 -0
- data/data/fr.yaml +70 -0
- data/data/gb.yaml +106 -0
- data/data/ie.yaml +58 -0
- data/data/index.yaml +23 -0
- data/data/is.yaml +136 -0
- data/data/it.yaml +66 -0
- data/data/mx.yaml +106 -0
- data/data/nl.yaml +67 -0
- data/data/north_america_informal.yaml +49 -0
- data/data/nyse.yaml +63 -0
- data/data/pt.yaml +85 -0
- data/data/se.yaml +91 -0
- data/data/united_nations.yaml +188 -0
- data/data/ups.yaml +56 -0
- data/data/us.yaml +81 -0
- data/data/za.yaml +78 -0
- data/lib/holidays.rb +404 -0
- data/lib/holidays/MANIFEST +25 -0
- data/lib/holidays/au.rb +42 -0
- data/lib/holidays/ca.rb +68 -0
- data/lib/holidays/de.rb +50 -0
- data/lib/holidays/dk.rb +47 -0
- data/lib/holidays/es.rb +52 -0
- data/lib/holidays/europe.rb +214 -0
- data/lib/holidays/fr.rb +36 -0
- data/lib/holidays/gb.rb +40 -0
- data/lib/holidays/ie.rb +32 -0
- data/lib/holidays/is.rb +61 -0
- data/lib/holidays/it.rb +35 -0
- data/lib/holidays/mx.rb +51 -0
- data/lib/holidays/nl.rb +36 -0
- data/lib/holidays/north_america.rb +107 -0
- data/lib/holidays/nyse.rb +32 -0
- data/lib/holidays/pt.rb +43 -0
- data/lib/holidays/scandinavia.rb +114 -0
- data/lib/holidays/se.rb +52 -0
- data/lib/holidays/united_nations.rb +24 -0
- data/lib/holidays/ups.rb +31 -0
- data/lib/holidays/us.rb +48 -0
- data/lib/holidays/za.rb +35 -0
- data/rakefile.rb +150 -0
- data/test/defs/test_defs_au.rb +36 -0
- data/test/defs/test_defs_ca.rb +29 -0
- data/test/defs/test_defs_de.rb +49 -0
- data/test/defs/test_defs_dk.rb +30 -0
- data/test/defs/test_defs_es.rb +57 -0
- data/test/defs/test_defs_europe.rb +243 -0
- data/test/defs/test_defs_fr.rb +26 -0
- data/test/defs/test_defs_gb.rb +36 -0
- data/test/defs/test_defs_ie.rb +21 -0
- data/test/defs/test_defs_is.rb +33 -0
- data/test/defs/test_defs_it.rb +25 -0
- data/test/defs/test_defs_mx.rb +22 -0
- data/test/defs/test_defs_nl.rb +24 -0
- data/test/defs/test_defs_north_america.rb +54 -0
- data/test/defs/test_defs_nyse.rb +22 -0
- data/test/defs/test_defs_pt.rb +56 -0
- data/test/defs/test_defs_scandinavia.rb +75 -0
- data/test/defs/test_defs_se.rb +32 -0
- data/test/defs/test_defs_ups.rb +21 -0
- data/test/defs/test_defs_us.rb +23 -0
- data/test/defs/test_defs_za.rb +25 -0
- metadata +132 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/ups'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/ups.yaml
|
7
|
+
class UpsDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_ups
|
10
|
+
{Date.civil(2008,1,1) => 'New Year\'s Day',
|
11
|
+
Date.civil(2008,5,26) => 'Memorial Day',
|
12
|
+
Date.civil(2008,7,4) => 'Independence Day',
|
13
|
+
Date.civil(2008,9,1) => 'Labor Day',
|
14
|
+
Date.civil(2008,11,27) => 'Thanksgiving',
|
15
|
+
Date.civil(2008,11,28) => 'Day After Thanksgiving',
|
16
|
+
Date.civil(2008,12,25) => 'Christmas Day',
|
17
|
+
Date.civil(2008,12,31) => 'New Year\'s Eve',}.each do |date, name|
|
18
|
+
assert_equal name, Holidays.on(date, :ups)[0][:name]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/us'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/us.yaml, data/north_america_informal.yaml
|
7
|
+
class UsDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_us
|
10
|
+
{Date.civil(2008,1,1) => 'New Year\'s Day',
|
11
|
+
Date.civil(2008,1,21) => 'Martin Luther King, Jr. Day',
|
12
|
+
Date.civil(2008,2,18) => 'Presidents\' Day',
|
13
|
+
Date.civil(2008,5,26) => 'Memorial Day',
|
14
|
+
Date.civil(2008,7,4) => 'Independence Day',
|
15
|
+
Date.civil(2008,9,1) => 'Labor Day',
|
16
|
+
Date.civil(2008,10,13) => 'Columbus Day',
|
17
|
+
Date.civil(2008,11,11) => 'Veterans Day',
|
18
|
+
Date.civil(2008,11,27) => 'Thanksgiving',
|
19
|
+
Date.civil(2008,12,25) => 'Christmas Day'}.each do |date, name|
|
20
|
+
assert_equal name, Holidays.on(date, :us)[0][:name]
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'holidays/za'
|
3
|
+
|
4
|
+
# This file is generated by the Ruby Holiday gem.
|
5
|
+
#
|
6
|
+
# Definitions loaded: data/za.yaml
|
7
|
+
class ZaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_za
|
10
|
+
{Date.civil(2007,1,1) => 'New Year\'s Day',
|
11
|
+
Date.civil(2007,3,21) => 'Human Rights Day',
|
12
|
+
Date.civil(2007,4,6) => 'Good Friday',
|
13
|
+
Date.civil(2007,4,9) => 'Family Day',
|
14
|
+
Date.civil(2007,4,27) => 'Freedom Day',
|
15
|
+
Date.civil(2007,5,1) => 'Workers Day',
|
16
|
+
Date.civil(2007,6,16) => 'Youth Day',
|
17
|
+
Date.civil(2007,8,9) => 'National Women\'s Day',
|
18
|
+
Date.civil(2007,9,24) => 'Heritage Day',
|
19
|
+
Date.civil(2007,12,16) => 'Day of Reconciliation',
|
20
|
+
Date.civil(2007,12,25) => 'Christmas Day',
|
21
|
+
Date.civil(2007,12,26) => 'Day of Goodwill'}.each do |date, name|
|
22
|
+
assert_equal name, Holidays.on(date, :za, :informal)[0][:name]
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bjeanes-holidays
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.5
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alex Dunae
|
8
|
+
- Bodaniel Jeanes
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2010-01-12 00:00:00 +10:00
|
14
|
+
default_executable:
|
15
|
+
dependencies: []
|
16
|
+
|
17
|
+
description: " A collection of Ruby methods to deal with statutory and other holidays. You deserve a holiday!\n"
|
18
|
+
email:
|
19
|
+
executables: []
|
20
|
+
|
21
|
+
extensions: []
|
22
|
+
|
23
|
+
extra_rdoc_files:
|
24
|
+
- README.rdoc
|
25
|
+
- data/SYNTAX
|
26
|
+
- lib/holidays/MANIFEST
|
27
|
+
- REFERENCES
|
28
|
+
- CHANGELOG
|
29
|
+
- LICENSE
|
30
|
+
files:
|
31
|
+
- lib/holidays/au.rb
|
32
|
+
- lib/holidays/ca.rb
|
33
|
+
- lib/holidays/de.rb
|
34
|
+
- lib/holidays/dk.rb
|
35
|
+
- lib/holidays/es.rb
|
36
|
+
- lib/holidays/europe.rb
|
37
|
+
- lib/holidays/fr.rb
|
38
|
+
- lib/holidays/gb.rb
|
39
|
+
- lib/holidays/ie.rb
|
40
|
+
- lib/holidays/is.rb
|
41
|
+
- lib/holidays/it.rb
|
42
|
+
- lib/holidays/MANIFEST
|
43
|
+
- lib/holidays/mx.rb
|
44
|
+
- lib/holidays/nl.rb
|
45
|
+
- lib/holidays/north_america.rb
|
46
|
+
- lib/holidays/nyse.rb
|
47
|
+
- lib/holidays/pt.rb
|
48
|
+
- lib/holidays/scandinavia.rb
|
49
|
+
- lib/holidays/se.rb
|
50
|
+
- lib/holidays/united_nations.rb
|
51
|
+
- lib/holidays/ups.rb
|
52
|
+
- lib/holidays/us.rb
|
53
|
+
- lib/holidays/za.rb
|
54
|
+
- lib/holidays.rb
|
55
|
+
- data/au.yaml
|
56
|
+
- data/build_defs.rb
|
57
|
+
- data/ca.yaml
|
58
|
+
- data/de.yaml
|
59
|
+
- data/dk.yaml
|
60
|
+
- data/es.yaml
|
61
|
+
- data/fr.yaml
|
62
|
+
- data/gb.yaml
|
63
|
+
- data/ie.yaml
|
64
|
+
- data/index.yaml
|
65
|
+
- data/is.yaml
|
66
|
+
- data/it.yaml
|
67
|
+
- data/mx.yaml
|
68
|
+
- data/nl.yaml
|
69
|
+
- data/north_america_informal.yaml
|
70
|
+
- data/nyse.yaml
|
71
|
+
- data/pt.yaml
|
72
|
+
- data/se.yaml
|
73
|
+
- data/SYNTAX
|
74
|
+
- data/united_nations.yaml
|
75
|
+
- data/ups.yaml
|
76
|
+
- data/us.yaml
|
77
|
+
- data/za.yaml
|
78
|
+
- rakefile.rb
|
79
|
+
- README.rdoc
|
80
|
+
- REFERENCES
|
81
|
+
- CHANGELOG
|
82
|
+
- LICENSE
|
83
|
+
has_rdoc: true
|
84
|
+
homepage: http://code.dunae.ca/holidays
|
85
|
+
licenses: []
|
86
|
+
|
87
|
+
post_install_message:
|
88
|
+
rdoc_options: []
|
89
|
+
|
90
|
+
require_paths:
|
91
|
+
- lib
|
92
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: "0"
|
97
|
+
version:
|
98
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: "0"
|
103
|
+
version:
|
104
|
+
requirements: []
|
105
|
+
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 1.3.5
|
108
|
+
signing_key:
|
109
|
+
specification_version: 3
|
110
|
+
summary: A collection of Ruby methods to deal with statutory and other holidays. You deserve a holiday!
|
111
|
+
test_files:
|
112
|
+
- test/defs/test_defs_au.rb
|
113
|
+
- test/defs/test_defs_ca.rb
|
114
|
+
- test/defs/test_defs_de.rb
|
115
|
+
- test/defs/test_defs_dk.rb
|
116
|
+
- test/defs/test_defs_es.rb
|
117
|
+
- test/defs/test_defs_europe.rb
|
118
|
+
- test/defs/test_defs_fr.rb
|
119
|
+
- test/defs/test_defs_gb.rb
|
120
|
+
- test/defs/test_defs_ie.rb
|
121
|
+
- test/defs/test_defs_is.rb
|
122
|
+
- test/defs/test_defs_it.rb
|
123
|
+
- test/defs/test_defs_mx.rb
|
124
|
+
- test/defs/test_defs_nl.rb
|
125
|
+
- test/defs/test_defs_north_america.rb
|
126
|
+
- test/defs/test_defs_nyse.rb
|
127
|
+
- test/defs/test_defs_pt.rb
|
128
|
+
- test/defs/test_defs_scandinavia.rb
|
129
|
+
- test/defs/test_defs_se.rb
|
130
|
+
- test/defs/test_defs_ups.rb
|
131
|
+
- test/defs/test_defs_us.rb
|
132
|
+
- test/defs/test_defs_za.rb
|