jactive_support 3.0.0.pre1 → 3.0.0.pre2
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 963ceeb8d49ac1adbde672f3ca42c172809a5284
|
4
|
+
data.tar.gz: 816899e706655171b3ce6a7d536e019632ea512d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35fff230b57067d39d0beee5165b193c6ce1f5c5cc987b3c348244746f331c8fd9de4ba64fe6b4dd0b33a126bdc83e55a4b278ed1387c65d93825d12a62e85b9
|
7
|
+
data.tar.gz: 2405dba27dcd085de6c404a303a8a93deb95c3e4b4630607039ab870d768ce23c2aab98ecbda30a8905f2861ca8c072723beed57a6739bc904b72bb283a54873
|
@@ -3,7 +3,7 @@ require 'jactive_support/java_ext/date/conversions'
|
|
3
3
|
class java::sql::Date
|
4
4
|
DATE_FORMATS = {
|
5
5
|
:db => "yyyy-MM-dd",
|
6
|
-
:i18n => lambda { |clazz, locale| clazz.i18n_formatter(locale) },
|
6
|
+
:i18n => lambda { |clazz, locale| clazz.i18n_formatter(locale: locale) },
|
7
7
|
:number => "yyyyMMdd",
|
8
8
|
:full => lambda { |clazz, locale| clazz.date_instance(:full, locale) },
|
9
9
|
:long => lambda { |clazz, locale| clazz.date_instance(:long, locale) },
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require File.expand_path('../../../shared/fixtures', __FILE__)
|
2
|
+
require 'jactive_support/java_ext/sql_date/conversions'
|
3
|
+
|
4
|
+
describe "java::sql::Date#to_formatted_s" do
|
5
|
+
it "formats using locale format" do
|
6
|
+
setup_date_translations
|
7
|
+
date = java::sql::Date.new(1192140000000)
|
8
|
+
date.to_formatted_s(:i18n).should == '12/10/2007'
|
9
|
+
end
|
10
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jactive_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.pre2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Olsen
|
@@ -228,6 +228,7 @@ files:
|
|
228
228
|
- spec/java_ext/map/values_spec.rb
|
229
229
|
- spec/java_ext/sql_date/localize_spec.rb
|
230
230
|
- spec/java_ext/sql_date/parse_spec.rb
|
231
|
+
- spec/java_ext/sql_date/to_formatted_s_spec.rb
|
231
232
|
- spec/locale_spec.rb
|
232
233
|
- spec/shared/fixtures.rb
|
233
234
|
- spec/shared/version.rb
|
@@ -346,6 +347,7 @@ test_files:
|
|
346
347
|
- spec/java_ext/map/values_spec.rb
|
347
348
|
- spec/java_ext/sql_date/localize_spec.rb
|
348
349
|
- spec/java_ext/sql_date/parse_spec.rb
|
350
|
+
- spec/java_ext/sql_date/to_formatted_s_spec.rb
|
349
351
|
- spec/locale_spec.rb
|
350
352
|
- spec/shared/fixtures.rb
|
351
353
|
- spec/shared/version.rb
|