jalalidate 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +17 -16
- data/README.md +14 -11
- data/jalalidate.gemspec +0 -1
- data/lib/jalalidate.rb +5 -2
- data/lib/jalalidate/version.rb +1 -1
- data/spec/jalalidate_spec.rb +1 -0
- metadata +5 -7
data/LICENSE
CHANGED
@@ -1,20 +1,21 @@
|
|
1
|
-
Copyright (c)
|
1
|
+
Copyright (c) 2011 Allen A. Bargi <http://github.com/aziz>
|
2
2
|
|
3
|
-
Permission
|
4
|
-
a copy of
|
5
|
-
"Software"), to deal in the Software without
|
6
|
-
without limitation the rights to use, copy,
|
7
|
-
distribute, sublicense, and/or sell copies of
|
8
|
-
permit persons to whom the Software is
|
9
|
-
the following conditions:
|
3
|
+
Permission is hereby granted, free of charge, to any person ob-
|
4
|
+
taining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without restric-
|
6
|
+
tion, including without limitation the rights to use, copy, modi-
|
7
|
+
fy, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
the Software, and to permit persons to whom the Software is fur-
|
9
|
+
nished to do so, subject to the following conditions:
|
10
10
|
|
11
|
-
The
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
12
|
included in all copies or substantial portions of the Software.
|
13
13
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
15
|
-
EXPRESS
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
|
17
|
-
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
16
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONIN-
|
17
|
+
FRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
19
|
+
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -5,25 +5,28 @@
|
|
5
5
|
|
6
6
|
## History
|
7
7
|
|
8
|
+
#### 0.3.1 - 26.APR.2011
|
9
|
+
* Added ruby 1.9 compatibility, courtesy of [Reza](https://github.com/ryco)
|
10
|
+
|
8
11
|
#### 0.3 - 6.JAN.2011
|
9
12
|
* JalaiDate could be initialized with Time and DateTime objects
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
13
|
+
* More options for strftime method %H,%M,%S,%X,%Z,%I,%p. read docs for more information
|
14
|
+
* Added jdate and jcal binaries to access jcal from the command-line
|
15
|
+
* Updated some documentations
|
16
|
+
* Now using bundler
|
14
17
|
|
15
18
|
#### 0.2 - 25.FEB.2010
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
19
|
+
* Renamed the gem from JalaliDate to jalalidate
|
20
|
+
* Added spec and a full test suite
|
21
|
+
* Updated gemspec file for rubygems.org
|
22
|
+
* Updated some documentations
|
20
23
|
|
21
24
|
#### 0.02 - 08.AUG.2008
|
22
|
-
*
|
23
|
-
*
|
25
|
+
* Added jalali to geregorian date convertor.
|
26
|
+
* Added JalaliDate class and ported Date class method to JalaliDate
|
24
27
|
|
25
28
|
#### 0.01 - 07.AUG.2008
|
26
|
-
*
|
29
|
+
* Planning the project
|
27
30
|
|
28
31
|
|
29
32
|
## Note on Patches/Pull Requests
|
data/jalalidate.gemspec
CHANGED
@@ -13,7 +13,6 @@ Gem::Specification.new do |s|
|
|
13
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
|
-
s.executables = ["jdate"]
|
17
16
|
s.files = `git ls-files`.split("\n")
|
18
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
data/lib/jalalidate.rb
CHANGED
@@ -1,11 +1,14 @@
|
|
1
|
+
# encoding: utf-8
|
1
2
|
# :title:Jalali Date #
|
2
|
-
|
3
|
+
if RUBY_VERSION < '1.9'
|
4
|
+
require "jcode"
|
5
|
+
$KCODE = 'u'
|
6
|
+
end
|
3
7
|
require "date"
|
4
8
|
|
5
9
|
class JalaliDate
|
6
10
|
|
7
11
|
#:stopdoc:
|
8
|
-
$KCODE = 'u'
|
9
12
|
GDaysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
10
13
|
JDaysInMonth = [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29]
|
11
14
|
PERSIAN_MONTH_NAMES = [nil, "فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"]
|
data/lib/jalalidate/version.rb
CHANGED
data/spec/jalalidate_spec.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jalalidate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Allen A. Bargi
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
18
|
+
date: 2011-04-26 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: rspec
|
@@ -76,7 +75,6 @@ files:
|
|
76
75
|
- lib/jalalidate/version.rb
|
77
76
|
- spec/jalalidate_spec.rb
|
78
77
|
- spec/spec_helper.rb
|
79
|
-
has_rdoc: true
|
80
78
|
homepage: http://github.com/aziz/jalalidate
|
81
79
|
licenses: []
|
82
80
|
|
@@ -106,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
104
|
requirements: []
|
107
105
|
|
108
106
|
rubyforge_project: jalalidate
|
109
|
-
rubygems_version: 1.
|
107
|
+
rubygems_version: 1.7.2
|
110
108
|
signing_key:
|
111
109
|
specification_version: 3
|
112
110
|
summary: A library for working with Jalali Calendar (a.k.a Persian Calendar)
|