mdemare-like_time 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +14 -1
- data/VERSION +1 -1
- data/lib/like_time.rb +1 -1
- data/like_time.gemspec +1 -1
- metadata +1 -1
data/README
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
Uses a natural format to specify a date/time format, by using a reference date/time.
|
2
2
|
This time is Sunday, December 31 1999, 23:59 UTC, or Sun 12-31-99 11:59 PM.
|
3
|
-
Capitalization of months/weekdays will match that in template.
|
3
|
+
Capitalization of months/weekdays will match that in template. Encoding should be UTF-8.
|
4
|
+
Capitalization of accented letters may not work.
|
4
5
|
The following subset of strftime is supported:
|
5
6
|
- Year long (1999)
|
6
7
|
- Year short (99)
|
@@ -44,3 +45,15 @@ t.like("Zo 31 dec")
|
|
44
45
|
t.like("31-12-99")
|
45
46
|
t.like("Zondag om 23 uur 59")
|
46
47
|
t.like("December, 1999")
|
48
|
+
|
49
|
+
Examples for French:
|
50
|
+
Time.set_default_template_language(:fr)
|
51
|
+
t = Time.now
|
52
|
+
t.like("Dimanche 31 DÉCEMBRE 23:59")
|
53
|
+
t.like("Di 31 déc")
|
54
|
+
|
55
|
+
Examples for German:
|
56
|
+
Time.set_default_template_language(:de)
|
57
|
+
t = Time.now
|
58
|
+
t.like("Sonntag 31 DEZEMBER 23:59")
|
59
|
+
t.like("So 31 dez")
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/lib/like_time.rb
CHANGED
@@ -33,7 +33,7 @@ class Time
|
|
33
33
|
:fr => {
|
34
34
|
:conversion => {"di" => :day, "dimanche" => :lday, "déc" => :month, "décembre" => :lmonth },
|
35
35
|
:day => %w(di lu ma me je ve sa),
|
36
|
-
:lday => %w(dimanche lundi mardi mercredi jeudi vendredi samedi)
|
36
|
+
:lday => %w(dimanche lundi mardi mercredi jeudi vendredi samedi),
|
37
37
|
:month => %w(x janv févr mars avril mai juin juil août sept oct nov déc),
|
38
38
|
:lmonth => %w(X janvier février mars avril mai juin juillet août septembre octobre novembre décembre)},
|
39
39
|
}
|
data/like_time.gemspec
CHANGED