date_tools 0.0.2 → 0.1.0
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/data/locales/ar.yml +47 -0
- data/data/locales/bg.yml +47 -0
- data/data/locales/ca.yml +47 -0
- data/data/locales/cs.yml +47 -0
- data/data/locales/da.yml +47 -0
- data/data/locales/de.yml +47 -0
- data/data/locales/de_at.yml +47 -0
- data/data/locales/de_ch.yml +47 -0
- data/data/locales/en.yml +47 -0
- data/data/locales/en_au.yml +47 -0
- data/data/locales/en_ca.yml +47 -0
- data/data/locales/en_gb.yml +47 -0
- data/data/locales/en_in.yml +47 -0
- data/data/locales/en_us.yml +47 -0
- data/data/locales/es.yml +47 -0
- data/data/locales/es_ar.yml +47 -0
- data/data/locales/es_cl.yml +47 -0
- data/data/locales/es_co.yml +47 -0
- data/data/locales/es_mx.yml +47 -0
- data/data/locales/es_pe.yml +47 -0
- data/data/locales/es_ve.yml +47 -0
- data/data/locales/fi.yml +47 -0
- data/data/locales/fr.yml +47 -0
- data/data/locales/fr_ca.yml +47 -0
- data/data/locales/fr_ch.yml +47 -0
- data/data/locales/it.yml +47 -0
- data/data/locales/it_ch.yml +47 -0
- data/data/locales/ko.yml +47 -0
- data/data/locales/lt.yml +47 -0
- data/data/locales/nl.yml +47 -0
- data/data/locales/nl_be.yml +47 -0
- data/data/locales/no.yml +47 -0
- data/data/locales/pt.yml +47 -0
- data/data/locales/pt_br.yml +47 -0
- data/data/locales/ru.yml +47 -0
- data/data/locales/se.yml +47 -0
- data/data/locales/sr.yml +47 -0
- data/data/locales/zh_TW.yml +47 -0
- data/examples/example_date_creator.rb +9 -1
- data/examples/example_date_i18n.rb +52 -0
- data/examples/example_date_locale.rb +18 -5
- data/examples/example_date_time_compare.rb +11 -2
- data/lib/date_tools.rb +93 -26
- data/lib/date_tools/date_locale.rb +126 -234
- data/lib/date_tools/date_time_compare.rb +3 -0
- data/unittest/test_date_creator.rb +1 -0
- data/unittest/test_date_locale.rb +103 -196
- data/unittest/test_date_locale_loaded.rb +113 -0
- data/unittest/test_date_time_compare.rb +1 -0
- data/unittest/test_date_tools.rb +13 -0
- metadata +90 -37
- data/readme.html +0 -68
- data/readme.txt +0 -50
@@ -0,0 +1,13 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
gem 'test-unit'
|
3
|
+
require 'test/unit'
|
4
|
+
$:.unshift('../lib') if $0 == __FILE__
|
5
|
+
require 'date_tools'
|
6
|
+
|
7
|
+
class Test_Date_tools < Test::Unit::TestCase
|
8
|
+
def test_version
|
9
|
+
assert_kind_of( String, DateTools::VERSION )
|
10
|
+
assert_equal( '0.1.0', DateTools::VERSION, "DateTools::VERSION changed? New version?" )
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
metadata
CHANGED
@@ -1,80 +1,133 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: date_tools
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
|
-
authors:
|
7
|
+
authors:
|
7
8
|
- Knut Lickert
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
|
12
|
-
date: 2009-12-26 00:00:00 +01:00
|
13
|
-
default_executable:
|
12
|
+
date: 2013-11-29 00:00:00.000000000 Z
|
14
13
|
dependencies: []
|
14
|
+
description: ! 'Little helper for the classes Date, DateTime and Time.
|
15
15
|
|
16
|
-
description: |
|
17
|
-
Little helper for the classes Date, DateTime and Time.
|
18
16
|
//
|
17
|
+
|
19
18
|
date_time_compare.rb:
|
19
|
+
|
20
20
|
Allows to compare Date and Time objects (allows to sort by mixed Date/Time-keys).
|
21
|
+
|
21
22
|
//
|
23
|
+
|
22
24
|
date_creator.rb:
|
25
|
+
|
23
26
|
New date creations:
|
27
|
+
|
24
28
|
Date#new_by_mday: Allows "Third sunday in june 2010"...
|
29
|
+
|
25
30
|
//
|
31
|
+
|
26
32
|
date_locale.rb:
|
33
|
+
|
27
34
|
Localization of Date, DateTime and Time.
|
35
|
+
|
28
36
|
strftime gets a optional parameter to determine the language.
|
37
|
+
|
29
38
|
Default is en, or if locale is used the current locale.
|
30
39
|
|
40
|
+
'
|
31
41
|
email: knut@lickert.net
|
32
42
|
executables: []
|
33
|
-
|
34
43
|
extensions: []
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
44
|
+
extra_rdoc_files:
|
45
|
+
- examples/example_date_creator.rb
|
46
|
+
- examples/example_date_locale.rb
|
47
|
+
- examples/example_date_i18n.rb
|
48
|
+
- examples/example_date_time_compare.rb
|
49
|
+
files:
|
39
50
|
- lib/date_tools.rb
|
40
51
|
- lib/date_tools/date_creator.rb
|
41
52
|
- lib/date_tools/date_locale.rb
|
42
53
|
- lib/date_tools/date_time_compare.rb
|
43
|
-
- readme.txt
|
44
|
-
- readme.html
|
45
54
|
- examples/example_date_creator.rb
|
46
55
|
- examples/example_date_locale.rb
|
56
|
+
- examples/example_date_i18n.rb
|
47
57
|
- examples/example_date_time_compare.rb
|
48
|
-
|
49
|
-
|
58
|
+
- data/locales/ar.yml
|
59
|
+
- data/locales/bg.yml
|
60
|
+
- data/locales/ca.yml
|
61
|
+
- data/locales/cs.yml
|
62
|
+
- data/locales/da.yml
|
63
|
+
- data/locales/de.yml
|
64
|
+
- data/locales/de_at.yml
|
65
|
+
- data/locales/de_ch.yml
|
66
|
+
- data/locales/en.yml
|
67
|
+
- data/locales/en_au.yml
|
68
|
+
- data/locales/en_ca.yml
|
69
|
+
- data/locales/en_gb.yml
|
70
|
+
- data/locales/en_in.yml
|
71
|
+
- data/locales/en_us.yml
|
72
|
+
- data/locales/es.yml
|
73
|
+
- data/locales/es_ar.yml
|
74
|
+
- data/locales/es_cl.yml
|
75
|
+
- data/locales/es_co.yml
|
76
|
+
- data/locales/es_mx.yml
|
77
|
+
- data/locales/es_pe.yml
|
78
|
+
- data/locales/es_ve.yml
|
79
|
+
- data/locales/fi.yml
|
80
|
+
- data/locales/fr.yml
|
81
|
+
- data/locales/fr_ca.yml
|
82
|
+
- data/locales/fr_ch.yml
|
83
|
+
- data/locales/it.yml
|
84
|
+
- data/locales/it_ch.yml
|
85
|
+
- data/locales/ko.yml
|
86
|
+
- data/locales/lt.yml
|
87
|
+
- data/locales/nl.yml
|
88
|
+
- data/locales/nl_be.yml
|
89
|
+
- data/locales/no.yml
|
90
|
+
- data/locales/pt.yml
|
91
|
+
- data/locales/pt_br.yml
|
92
|
+
- data/locales/ru.yml
|
93
|
+
- data/locales/se.yml
|
94
|
+
- data/locales/sr.yml
|
95
|
+
- data/locales/zh_TW.yml
|
96
|
+
- unittest/test_date_tools.rb
|
97
|
+
- unittest/test_date_creator.rb
|
98
|
+
- unittest/test_date_locale.rb
|
99
|
+
- unittest/test_date_locale_loaded.rb
|
100
|
+
- unittest/test_date_time_compare.rb
|
101
|
+
homepage:
|
50
102
|
licenses: []
|
51
|
-
|
52
103
|
post_install_message:
|
53
|
-
rdoc_options:
|
104
|
+
rdoc_options:
|
105
|
+
- --title "RDoc DateTools"
|
54
106
|
- --main
|
55
|
-
-
|
56
|
-
require_paths:
|
107
|
+
- date_tools.rb
|
108
|
+
require_paths:
|
57
109
|
- lib
|
58
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
110
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
+
none: false
|
112
|
+
requirements:
|
113
|
+
- - ! '>='
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: 1.9.2
|
116
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
|
+
none: false
|
118
|
+
requirements:
|
119
|
+
- - ! '>='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
70
122
|
requirements: []
|
71
|
-
|
72
123
|
rubyforge_project:
|
73
|
-
rubygems_version: 1.
|
124
|
+
rubygems_version: 1.8.24
|
74
125
|
signing_key:
|
75
126
|
specification_version: 3
|
76
127
|
summary: Some tools to handle dates (compare to time, locales, new creators)
|
77
|
-
test_files:
|
128
|
+
test_files:
|
129
|
+
- unittest/test_date_tools.rb
|
78
130
|
- unittest/test_date_creator.rb
|
79
131
|
- unittest/test_date_locale.rb
|
132
|
+
- unittest/test_date_locale_loaded.rb
|
80
133
|
- unittest/test_date_time_compare.rb
|
data/readme.html
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
|
3
|
-
Build by C:/Program Files/ruby/lib/ruby/gems/1.8/gems/docgenerator-1.2.0/./lib/docgenerator/document.rb
|
4
|
-
Dir: C:/usr/Script/date_tools
|
5
|
-
Creator: rakefile.rb
|
6
|
-
Target: readme.html
|
7
|
-
2009/12/26 18:37:11
|
8
|
-
|
9
|
-
Generation-Info-End
|
10
|
-
-->
|
11
|
-
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
|
12
|
-
<html>
|
13
|
-
<head ></head>
|
14
|
-
<body ><h1 >date_tools-Gem</h1>
|
15
|
-
<p >
|
16
|
-
Some tools to handle dates:
|
17
|
-
</p>
|
18
|
-
<ul >
|
19
|
-
<li >compare to time (sort date and time-objects) </li>
|
20
|
-
<li >locales </li>
|
21
|
-
<li >new creators </li>
|
22
|
-
</ul>
|
23
|
-
<p >
|
24
|
-
Check the examples-folders to get an impression of the gem.
|
25
|
-
</p>
|
26
|
-
<h1 >Gem-Content</h1>
|
27
|
-
<h2 >date_tools/date_time_compare.rb:</h2>
|
28
|
-
<p >
|
29
|
-
Allows to compare Date and Time objects (allows to sort by mixed
|
30
|
-
Date/Time-keys).
|
31
|
-
</p>
|
32
|
-
<p >
|
33
|
-
→ please check the examples in <a href = "./examples/example_date_time_compare.rb" >./examples/example_date_time_compare.rb</a>
|
34
|
-
</p>
|
35
|
-
<h2 >date_tools/date_creator.rb:</h2>
|
36
|
-
<p >
|
37
|
-
New date creations: Date#new_by_mday: Allows "Third sunday in june 2010"...
|
38
|
-
</p>
|
39
|
-
<p >
|
40
|
-
→ please check the examples in <a href = "./examples/example_date_creator.rb" >./examples/example_date_creator.rb</a>
|
41
|
-
</p>
|
42
|
-
<h2 >date_tools/date_locale.rb:</h2>
|
43
|
-
<p >
|
44
|
-
Localization of Date, DateTime and Time.
|
45
|
-
</p>
|
46
|
-
<p >
|
47
|
-
strftime gets a optional parameter to determine the language. Default is en, or if locale is used the current locale.
|
48
|
-
</p>
|
49
|
-
<p >
|
50
|
-
→ please check the examples in <a href = "./examples/example_date_locale.rb" >./examples/example_date_locale.rb</a>
|
51
|
-
</p>
|
52
|
-
<h1 >Version history:</h1>
|
53
|
-
<p >
|
54
|
-
0.0.1 2009-11-13
|
55
|
-
</p>
|
56
|
-
<ul >
|
57
|
-
<li >Initial version, including date_locale.rb and date_time_compare.rb </li>
|
58
|
-
</ul>
|
59
|
-
<p >
|
60
|
-
0.0.2 2009-12-18
|
61
|
-
</p>
|
62
|
-
<ul >
|
63
|
-
<li >Add date_creator </li>
|
64
|
-
<li >folder reorg with date_tools see Gem-packaging question: <a href = "http://forum.ruby-portal.de/viewtopic.php?f=6&t=10654" >http://forum.ruby-portal.de/viewtopic.php?f=6&t=10654</a> </li>
|
65
|
-
<li >added examples (2009-12-28) </li>
|
66
|
-
</ul>
|
67
|
-
</body>
|
68
|
-
</html>
|
data/readme.txt
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
date_tools-Gem
|
4
|
-
------------------------------
|
5
|
-
|
6
|
-
Some tools to handle dates:
|
7
|
-
- compare to time (sort date and time-objects)
|
8
|
-
- locales
|
9
|
-
- new creators
|
10
|
-
|
11
|
-
Check the examples-folders to get an impression of the gem.
|
12
|
-
|
13
|
-
Gem-Content
|
14
|
-
------------------------------
|
15
|
-
|
16
|
-
date_tools/date_time_compare.rb:
|
17
|
-
------------------------------
|
18
|
-
|
19
|
-
Allows to compare Date and Time objects (allows to sort by mixed
|
20
|
-
Date/Time-keys).
|
21
|
-
|
22
|
-
-> please check the examples in ./examples/example_date_time_compare.rb (./examples/example_date_time_compare.rb)
|
23
|
-
|
24
|
-
date_tools/date_creator.rb:
|
25
|
-
------------------------------
|
26
|
-
|
27
|
-
New date creations: Date#new_by_mday: Allows "Third sunday in june 2010"...
|
28
|
-
|
29
|
-
-> please check the examples in ./examples/example_date_creator.rb (./examples/example_date_creator.rb)
|
30
|
-
|
31
|
-
date_tools/date_locale.rb:
|
32
|
-
------------------------------
|
33
|
-
|
34
|
-
Localization of Date, DateTime and Time.
|
35
|
-
|
36
|
-
strftime gets a optional parameter to determine the language. Default is en, or if locale is used the current locale.
|
37
|
-
|
38
|
-
-> please check the examples in ./examples/example_date_locale.rb (./examples/example_date_locale.rb)
|
39
|
-
|
40
|
-
Version history:
|
41
|
-
------------------------------
|
42
|
-
|
43
|
-
0.0.1 2009-11-13
|
44
|
-
- Initial version, including date_locale.rb and date_time_compare.rb
|
45
|
-
|
46
|
-
0.0.2 2009-12-18
|
47
|
-
- Add date_creator
|
48
|
-
- folder reorg with date_tools see Gem-packaging question: http://forum.ruby-portal.de/viewtopic.php?f=6&t=10654 (http://forum.ruby-portal.de/viewtopic.php?f=6&t=10654)
|
49
|
-
- added examples (2009-12-28)
|
50
|
-
|