time_extended 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -3
- data/lib/time_extended.rb +2 -2
- data/time_extended.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5042616d606ca28cbd9675cc04f8dfe7d99e4b24
|
4
|
+
data.tar.gz: 5f235153e4a383b3d4a5e65fa9d53294d696f041
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1658c191acacdda8107eabbf7827da5c142839af25b19d9e3c5afbf7fa000ac18973cbeb61e95226e38fc4d10e3280e0e276853d746b0265f06e117df930c12
|
7
|
+
data.tar.gz: 17161a30494e5853ad0f6d055c08e0eb7794c173a3f869247d7c26ce65258e2e2ef545486f14b1831e4b8cfa7392f4e48bac91b52cd0d679203f6b7de765662a
|
data/README.md
CHANGED
@@ -22,9 +22,15 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
```ruby
|
26
|
+
require 'date'
|
27
|
+
require 'time_extended'
|
28
|
+
|
29
|
+
|
30
|
+
DateTime.now.ymd # => strftime("%y %m %d") => "14 11 06"
|
31
|
+
DateTime.now.Bd # => strftime("%B %d") => "November 06"
|
32
|
+
DateTime.now.M3N # => strftime("%M %3N") => "51 963"
|
33
|
+
```
|
28
34
|
|
29
35
|
## Contributing
|
30
36
|
|
data/lib/time_extended.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# Extend and simplify Ruby class `DateTime`
|
2
2
|
class DateTime
|
3
|
-
def method_missing(method
|
3
|
+
def method_missing(method)
|
4
4
|
options = ''
|
5
5
|
|
6
6
|
params = method.to_s.split('')
|
7
7
|
params.each do |el|
|
8
8
|
options = "#{options}#{el}"
|
9
|
-
options = "#{options} " if el
|
9
|
+
options = "#{options} " if ('a'..'z').include?(el) || ('A'..'Z').include?(el)
|
10
10
|
end
|
11
11
|
options = "%#{options.split(' ').join(' %')}"
|
12
12
|
|
data/time_extended.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'time_extended'
|
7
|
-
spec.version = '0.0.
|
7
|
+
spec.version = '0.0.8'
|
8
8
|
spec.authors = ['Roman Vakulchik']
|
9
9
|
spec.email = ['rvakulchik@yandex.ru']
|
10
10
|
spec.summary = 'Time extended!'
|