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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8104b92e63528c3fa1659b0b056e4a48e2328f05
4
- data.tar.gz: 1f7bf8a679ab13114ee4c771cd05c1f431640244
3
+ metadata.gz: 5042616d606ca28cbd9675cc04f8dfe7d99e4b24
4
+ data.tar.gz: 5f235153e4a383b3d4a5e65fa9d53294d696f041
5
5
  SHA512:
6
- metadata.gz: a6c072633fa98178556cd850d31a82a5240e171431447d866c5dd85259cec1e4eb75b72321cadce46a35f0a9cbb1891311b05411a844748baa39ca6aff08dfed
7
- data.tar.gz: 878770b5682dd0fe0c2a7ea3f911748614679bb6161c1a90e70922a6091e0f37ab258bf4957dbf379ac02f028ec9c8dbb35a01a67cf4e5536e940f48bbd196f6
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
- * DateTime.now.ymd => strftime("%y %m %d")
26
- * DateTime.now.Bd => strftime("%B %d")
27
- * DateTime.now.M3N => strftime("%M %3N")
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
 
@@ -1,12 +1,12 @@
1
1
  # Extend and simplify Ruby class `DateTime`
2
2
  class DateTime
3
- def method_missing(method, *args)
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.to_i == 0
9
+ options = "#{options} " if ('a'..'z').include?(el) || ('A'..'Z').include?(el)
10
10
  end
11
11
  options = "%#{options.split(' ').join(' %')}"
12
12
 
@@ -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'
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!'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_extended
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Vakulchik