parsi-date 0.1.pre → 0.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/MIT-LICENSE +20 -0
- data/README.rdoc +6 -0
- data/TODO +13 -0
- data/lib/version.rb +1 -1
- data/parsi-date.gemspec +2 -2
- metadata +10 -7
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2012 Hassan Zamani
|
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:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
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.
|
data/README.rdoc
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
= Parsi Date
|
2
|
+
|
3
|
+
This is an implementation of {Solar Hijri Calendar}[http://en.wikipedia.org/wiki/Solar_Hijri_calendar]
|
4
|
+
(some times referred to as Jalali or Persian Calendar) which is Iran's official calendar.
|
5
|
+
Main aim of this gem is to create a Solar Hijri date library as close as possible to built-in date library.
|
6
|
+
Conversion algorithm originally adopted from {here}[http://www.fourmilab.ch/documents/calendar/].
|
data/TODO
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
(A) Write rdocs
|
2
|
+
(A) Fulfill specs
|
3
|
+
|
4
|
+
Add change log
|
5
|
+
|
6
|
+
Add activerecord helper: (maybe it's better to add somewhere else parsi-localize for example)
|
7
|
+
|
8
|
+
class Product < ActiveRecord::Base
|
9
|
+
# this must add :parsi_released_at accessors and sync with original attribute
|
10
|
+
has_parsi_date_for :released_at
|
11
|
+
|
12
|
+
# can have an optional name
|
13
|
+
has_parsi_date_for :lifecycel_ended_at, as: 'end_of_life'
|
data/lib/version.rb
CHANGED
data/parsi-date.gemspec
CHANGED
@@ -10,8 +10,8 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.author = 'Hassan Zamani'
|
11
11
|
s.email = 'hsn.zamani@gmail.com'
|
12
12
|
s.homepage = 'http://github.com/hzamani/parsi-date'
|
13
|
-
s.summary = '
|
14
|
-
s.description = "A
|
13
|
+
s.summary = 'Solar Hijri (Jalali, Persian, Parsi) date library for Ruby'
|
14
|
+
s.description = "A date library for Ruby based on Iran's standard calandar, whitch provides much of Ruby's built-in date class"
|
15
15
|
|
16
16
|
|
17
17
|
# Load Paths...
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parsi-date
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
5
|
-
prerelease:
|
4
|
+
version: '0.1'
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Hassan Zamani
|
@@ -59,8 +59,8 @@ dependencies:
|
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
-
description: A
|
63
|
-
date class
|
62
|
+
description: A date library for Ruby based on Iran's standard calandar, whitch provides
|
63
|
+
much of Ruby's built-in date class
|
64
64
|
email: hsn.zamani@gmail.com
|
65
65
|
executables: []
|
66
66
|
extensions: []
|
@@ -70,6 +70,9 @@ files:
|
|
70
70
|
- .rspec
|
71
71
|
- Gemfile
|
72
72
|
- Gemfile.lock
|
73
|
+
- MIT-LICENSE
|
74
|
+
- README.rdoc
|
75
|
+
- TODO
|
73
76
|
- lib/parsi-date.rb
|
74
77
|
- lib/parsi-datetime.rb
|
75
78
|
- lib/version.rb
|
@@ -100,15 +103,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
104
|
none: false
|
102
105
|
requirements:
|
103
|
-
- - ! '
|
106
|
+
- - ! '>='
|
104
107
|
- !ruby/object:Gem::Version
|
105
|
-
version:
|
108
|
+
version: '0'
|
106
109
|
requirements: []
|
107
110
|
rubyforge_project:
|
108
111
|
rubygems_version: 1.8.24
|
109
112
|
signing_key:
|
110
113
|
specification_version: 3
|
111
|
-
summary:
|
114
|
+
summary: Solar Hijri (Jalali, Persian, Parsi) date library for Ruby
|
112
115
|
test_files:
|
113
116
|
- spec/parsi-date/accessor_spec.rb
|
114
117
|
- spec/parsi-date/add_month_spec.rb
|