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.
Files changed (53) hide show
  1. data/data/locales/ar.yml +47 -0
  2. data/data/locales/bg.yml +47 -0
  3. data/data/locales/ca.yml +47 -0
  4. data/data/locales/cs.yml +47 -0
  5. data/data/locales/da.yml +47 -0
  6. data/data/locales/de.yml +47 -0
  7. data/data/locales/de_at.yml +47 -0
  8. data/data/locales/de_ch.yml +47 -0
  9. data/data/locales/en.yml +47 -0
  10. data/data/locales/en_au.yml +47 -0
  11. data/data/locales/en_ca.yml +47 -0
  12. data/data/locales/en_gb.yml +47 -0
  13. data/data/locales/en_in.yml +47 -0
  14. data/data/locales/en_us.yml +47 -0
  15. data/data/locales/es.yml +47 -0
  16. data/data/locales/es_ar.yml +47 -0
  17. data/data/locales/es_cl.yml +47 -0
  18. data/data/locales/es_co.yml +47 -0
  19. data/data/locales/es_mx.yml +47 -0
  20. data/data/locales/es_pe.yml +47 -0
  21. data/data/locales/es_ve.yml +47 -0
  22. data/data/locales/fi.yml +47 -0
  23. data/data/locales/fr.yml +47 -0
  24. data/data/locales/fr_ca.yml +47 -0
  25. data/data/locales/fr_ch.yml +47 -0
  26. data/data/locales/it.yml +47 -0
  27. data/data/locales/it_ch.yml +47 -0
  28. data/data/locales/ko.yml +47 -0
  29. data/data/locales/lt.yml +47 -0
  30. data/data/locales/nl.yml +47 -0
  31. data/data/locales/nl_be.yml +47 -0
  32. data/data/locales/no.yml +47 -0
  33. data/data/locales/pt.yml +47 -0
  34. data/data/locales/pt_br.yml +47 -0
  35. data/data/locales/ru.yml +47 -0
  36. data/data/locales/se.yml +47 -0
  37. data/data/locales/sr.yml +47 -0
  38. data/data/locales/zh_TW.yml +47 -0
  39. data/examples/example_date_creator.rb +9 -1
  40. data/examples/example_date_i18n.rb +52 -0
  41. data/examples/example_date_locale.rb +18 -5
  42. data/examples/example_date_time_compare.rb +11 -2
  43. data/lib/date_tools.rb +93 -26
  44. data/lib/date_tools/date_locale.rb +126 -234
  45. data/lib/date_tools/date_time_compare.rb +3 -0
  46. data/unittest/test_date_creator.rb +1 -0
  47. data/unittest/test_date_locale.rb +103 -196
  48. data/unittest/test_date_locale_loaded.rb +113 -0
  49. data/unittest/test_date_time_compare.rb +1 -0
  50. data/unittest/test_date_tools.rb +13 -0
  51. metadata +90 -37
  52. data/readme.html +0 -68
  53. data/readme.txt +0 -50
@@ -1,3 +1,4 @@
1
+ gem 'test-unit'
1
2
  require '../lib/date_tools/date_time_compare.rb'
2
3
  require 'test/unit'
3
4
 
@@ -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.2
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
- extra_rdoc_files: []
37
-
38
- files:
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
- has_rdoc: true
49
- homepage: http://www.rubypla.net/
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
- - lib/date_tools.rb
56
- require_paths:
107
+ - date_tools.rb
108
+ require_paths:
57
109
  - lib
58
- required_ruby_version: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: "0"
63
- version:
64
- required_rubygems_version: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: "0"
69
- version:
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.3.5
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
@@ -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
- &rarr; 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
- &rarr; 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
- &rarr; 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
-