jalalidate 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/jalalidate.gemspec +3 -3
- data/lib/jalalidate.rb +3 -3
- data/lib/jalalidate/version.rb +1 -1
- metadata +32 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bf7eba63c33a160c3553674f2bd1aad3d9f221d
|
4
|
+
data.tar.gz: 41da84f5ba1469197043a770e155765359e74b4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb4b079ca21386fb1f4e34f19126de5e08a4c53adb87441fc8d84049fc32b40c8582bbc1737db09a9849af9982e0dbf982d8ebb76660a57533ec04feb87894f6
|
7
|
+
data.tar.gz: 66b452ef1d0b400eadc9b7705e711b2ba62a956e1c34fb0e3cdb736d754c975c3674eb2b1c788eefb3b52571b7e0efdb44027cd88c23fdb678e549ea61fb74a0
|
data/jalalidate.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.authors = ["Allen A. Bargi"]
|
10
10
|
s.email = %q{allen.bargi@gmail.com}
|
11
11
|
s.homepage = %q{http://github.com/aziz/jalalidate}
|
12
|
+
s.license = "MIT"
|
12
13
|
s.summary = %q{A library for working with Jalali Calendar (a.k.a Persian Calendar)}
|
13
|
-
s.description = %q{A library for working with Jalali Calendar (a.k.a Persian Calendar)}
|
14
14
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
15
15
|
s.rubyforge_project = "jalalidate"
|
16
16
|
s.files = `git ls-files`.split("\n")
|
@@ -19,6 +19,6 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
s.extra_rdoc_files = [ "LICENSE", "README.md"]
|
21
21
|
s.rdoc_options = ["--charset=UTF-8"]
|
22
|
-
s.add_development_dependency
|
23
|
-
s.add_development_dependency
|
22
|
+
s.add_development_dependency 'bundler', '~> 1.3', '>= 1.3.0'
|
23
|
+
s.add_development_dependency 'rspec', '~> 2.13', '>= 2.13.0'
|
24
24
|
end
|
data/lib/jalalidate.rb
CHANGED
@@ -83,9 +83,9 @@ class JalaliDate
|
|
83
83
|
# Accpets three numbers for year (4 digit), month and day in jalali calendar and checks if it's a
|
84
84
|
# valid date according to jalali calendar or not.
|
85
85
|
def valid?(y,m,d)
|
86
|
-
( y.class ==
|
87
|
-
m.class ==
|
88
|
-
d.class ==
|
86
|
+
( y.class == Integer && y > 0 &&
|
87
|
+
m.class == Integer && (1..12).include?(m) &&
|
88
|
+
d.class == Integer &&
|
89
89
|
(
|
90
90
|
((1..JDaysInMonth[m-1]).include?(d)) || (d == 30 && m == 12 && leap?(y))
|
91
91
|
)
|
data/lib/jalalidate/version.rb
CHANGED
metadata
CHANGED
@@ -1,44 +1,56 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jalalidate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allen A. Bargi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '1.3'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.3.0
|
20
23
|
type: :development
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - ~>
|
27
|
+
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
29
|
+
version: '1.3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.3.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
34
|
+
name: rspec
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - ~>
|
37
|
+
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
39
|
+
version: '2.13'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 2.13.0
|
34
43
|
type: :development
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
|
-
- - ~>
|
47
|
+
- - "~>"
|
39
48
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
-
|
49
|
+
version: '2.13'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 2.13.0
|
53
|
+
description:
|
42
54
|
email: allen.bargi@gmail.com
|
43
55
|
executables:
|
44
56
|
- jcal
|
@@ -48,7 +60,7 @@ extra_rdoc_files:
|
|
48
60
|
- LICENSE
|
49
61
|
- README.md
|
50
62
|
files:
|
51
|
-
- .gitignore
|
63
|
+
- ".gitignore"
|
52
64
|
- Gemfile
|
53
65
|
- Gemfile.lock
|
54
66
|
- LICENSE
|
@@ -64,26 +76,27 @@ files:
|
|
64
76
|
- spec/jalalidate_spec.rb
|
65
77
|
- spec/spec_helper.rb
|
66
78
|
homepage: http://github.com/aziz/jalalidate
|
67
|
-
licenses:
|
79
|
+
licenses:
|
80
|
+
- MIT
|
68
81
|
metadata: {}
|
69
82
|
post_install_message:
|
70
83
|
rdoc_options:
|
71
|
-
- --charset=UTF-8
|
84
|
+
- "--charset=UTF-8"
|
72
85
|
require_paths:
|
73
86
|
- lib
|
74
87
|
required_ruby_version: !ruby/object:Gem::Requirement
|
75
88
|
requirements:
|
76
|
-
- -
|
89
|
+
- - ">="
|
77
90
|
- !ruby/object:Gem::Version
|
78
91
|
version: '0'
|
79
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
93
|
requirements:
|
81
|
-
- -
|
94
|
+
- - ">="
|
82
95
|
- !ruby/object:Gem::Version
|
83
96
|
version: '0'
|
84
97
|
requirements: []
|
85
98
|
rubyforge_project: jalalidate
|
86
|
-
rubygems_version: 2.
|
99
|
+
rubygems_version: 2.6.13
|
87
100
|
signing_key:
|
88
101
|
specification_version: 4
|
89
102
|
summary: A library for working with Jalali Calendar (a.k.a Persian Calendar)
|