jalalidate 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/LICENSE CHANGED
@@ -1,20 +1,21 @@
1
- Copyright (c) 2008-2010 Allen A. Bargi
1
+ Copyright (c) 2011 Allen A. Bargi <http://github.com/aziz>
2
2
 
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
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 above copyright notice and this permission notice shall be
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 ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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
- * more options for strftime method %H,%M,%S,%X,%Z,%I,%p. read docs for more information
11
- * added jdate and jcal binaries to access jcal from the command-line
12
- * updated some documentations
13
- * now using bundler
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
- * renamed the gem from JalaliDate to jalalidate
17
- * added spec and a full test suite
18
- * updated gemspec file for rubygems.org
19
- * updated some documentations
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
- * added jalali to geregorian date convertor.
23
- * added JalaliDate class and ported Date class method to JalaliDate
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
- * planning the project
29
+ * Planning the project
27
30
 
28
31
 
29
32
  ## Note on Patches/Pull Requests
@@ -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) }
@@ -1,11 +1,14 @@
1
+ # encoding: utf-8
1
2
  # :title:Jalali Date #
2
- require "jcode"
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, "فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"]
@@ -1,3 +1,3 @@
1
1
  module Jalalidate
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
3
 
3
4
  describe JalaliDate do
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: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
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-01-06 00:00:00 +01:00
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.4.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)