hebcal 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
metadata ADDED
@@ -0,0 +1,116 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hebcal
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Isaac Betesh
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-04 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: ! "# HebCal\n\nDetermines the date of Passover for a Gregorian year.
15
+ Also includes boolean functions to check whether a date is a Jewish holiday, Fast
16
+ Day or Rosh Chodesh.\nSupported languages:\n Javascript\n Ruby\n\n## Installation
17
+ as a Ruby gem\n\nAdd this line to your application's Gemfile:\n gem 'hebcal'\nAnd
18
+ then execute:\n $ bundle\nOr install it yourself as:\n $ gem install hebcal\n\n##
19
+ General notes\n\n1. 3- and 4-digit years are supported, so the domain of valid years
20
+ is 100-9999. For years before the Gregorian transition (1582), the transition is
21
+ ignored and the proleptic Gregorian calendar is used.\n\n## Ruby Version\n\n###
22
+ To Run Unit Tests\n $ rake test\n\n### To Use\n\n#### Calculating the date of
23
+ Passover\n1. At the top of the file where the class is defined, declare `require
24
+ `hebcal``\n\n1. In the class, declare `include HebCal::Passover`\n\n1. `WhenIsPesach(yyyy)`
25
+ returns a Ruby Time object representing midnight on the first day of passover, where
26
+ `yyyy` is the Gregorian year\n\n Note that the date returned is the first day
27
+ of Pesach, not the day on which Pesach begins at sunset.\n\n#### Finding out if
28
+ a date is a holiday\n1. At the top of the file where the class is defined, declare
29
+ `require `hebcal``\n\n1. In the desired class, declare `include HebCal::Holidays`\n\n1.
30
+ `IsPesach(d)` returns true iff d is a Ruby Time object representing a date during
31
+ Pesach. Note that the day on which Pesach begins at sunset returns false.\n1. The
32
+ following functions work in a similar way to `IsPesach()`:\n 1. `IsShavuot()`, `IsRoshHashanah()`,
33
+ `IsYomKippur()`, `IsSukkot()`\n\n 1. `IsRegel()`: `IsPesach() || IsShavuot || IsSukkot()`\n\n
34
+ 1. `IsMoed()`: Hol HaMoed Pesach or Hol HaMoed Sukkot\n\n 1. `IsYomTov()`: `IsPesach()
35
+ || IsShavuot() || IsRoshHashanah() || IsSukkot()) && !IsMoed()`\n\n Note that
36
+ IsYomTov(yk) == false, where yk is the date of Yom Kippur.\n\n 1. `IsPurim()`, `IsHanuka()`\n\n
37
+ 1. `Is10Tevet()`, `IsTaanitEster()`, `Is17Tamuz()`, `Is9Av()`, `IsFastOfGedalia()`\n\n
38
+ 1. `IsTaanit()`: `Is10Tevet() || IsTaanitEster() || Is17Tamuz() || Is9Av() || IsFastOfGedalia()`\n\n
39
+ 1. `IsRoshChodesh()`\n\n## Javascript Version\n\n### To Run Unit Tests\n1. Open
40
+ index.html in a browser. You should see a lot of green text saying that tests passed.
41
+ \ If not, javascript may not be enabled in your browser. Scroll down to the bottom
42
+ and verify that the summary says all tests passed.\n\n### To Use\n1. Include the
43
+ javascript source file in your HTML page\n\n 1. If using Ruby On Rails, you can
44
+ declare `//= require hebcal` at the top of a javascript or coffeescript file\n 1.
45
+ To include the script explicitly in an html file, \n\n `<script src=\"app/assets/javascripts/hebcal/passover.js\"
46
+ type=\"text/javascript\"></script>`\n\n1. All date formats are YYYY-mm-dd, where
47
+ month is index from 1 (i.e. 1 == January, not the usual javascript index of 0 ==
48
+ January!) and YYYY is the Gregorian year.\n\n1. $.whenIsPesach(yyyy) returns a date
49
+ in the above format, where yyyy is the Gregorian year.\n\n Note that the date
50
+ returned is the first day of Pesach, not the day on which Pesach begins at sunset.\n1.
51
+ $.isPesach(d) returns true iff d is a date during Pesach, in the above format. Note
52
+ that the day on which Pesach begins at sunset returns false.\n1. The following functions
53
+ work in a similar way to $.isPesach():\n 1. $.isShavuot(), $.isRoshHashanah(), $.isYomKippur(),
54
+ $.isSukkot();\n\n 1. $.isRegel(): $.isPesach() || $.isShavuot() || $.isSukkot();\n\n
55
+ 1. $.isMoed(): Hol HaMoed Pesach or Hol HaMoed Sukkot;\n\n 1. $.isYomTov(): ($.isPesach()
56
+ || $.isSukkot() || $.isShavuot() || $.isRoshHashanah()) && !$.isMoed();\n\n Note
57
+ that isYomTov(yk) == false, where yk is the date of Yom Kippur.\n\n 1. `$.isPurim()`,
58
+ `$.isHanuka()`\n\n 1. `$.isRoshChodesh()`\n\n 1. `$.is10Tevet()`, `$.isTaanitEster()`,
59
+ `$.is17Tamuz()`, `$.is9Av()`, `$.isFastOfGedalia()`\n\n 1. `$.isTaanit()`: `$.is10Tevet()
60
+ || $.isTaanitEster() || $.is17Tamuz() || $.is9Av() || $.isFastOfGedalia()`\n\n"
61
+ email:
62
+ - iybetesh@gmail.com
63
+ executables: []
64
+ extensions: []
65
+ extra_rdoc_files: []
66
+ files:
67
+ - .gitignore
68
+ - Gemfile
69
+ - LICENSE
70
+ - README.md
71
+ - Rakefile
72
+ - app/assets/javascripts/hebcal/index.js
73
+ - app/assets/javascripts/hebcal/passover.js
74
+ - hebcal.gemspec
75
+ - index.html
76
+ - lib/hebcal.rb
77
+ - lib/hebcal/constants.rb
78
+ - lib/hebcal/engine.rb
79
+ - lib/hebcal/holidays.rb
80
+ - lib/hebcal/holidaysHelper.rb
81
+ - lib/hebcal/passover.rb
82
+ - lib/hebcal/passoverHelper.rb
83
+ - lib/hebcal/version.rb
84
+ - spec/holidays_spec.rb
85
+ - spec/passover_spec.rb
86
+ - test/test.js
87
+ homepage: https://github.com/betesh/hebcal
88
+ licenses:
89
+ - MIT
90
+ post_install_message:
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ! '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ requirements: []
107
+ rubyforge_project:
108
+ rubygems_version: 1.8.21
109
+ signing_key:
110
+ specification_version: 3
111
+ summary: Determines the date of Passover for a Gregorian year. Determines whether
112
+ a Gregorian date is a Jewish holiday.
113
+ test_files:
114
+ - spec/holidays_spec.rb
115
+ - spec/passover_spec.rb
116
+ - test/test.js