anjlab-widgets 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/anjlab-widgets/version.rb +1 -1
- data/lib/anjlab-widgets.rb +10 -1
- metadata +3 -3
data/lib/anjlab-widgets.rb
CHANGED
@@ -12,7 +12,6 @@ module Anjlab
|
|
12
12
|
else
|
13
13
|
"%Y-%m-%d"
|
14
14
|
end
|
15
|
-
|
16
15
|
end
|
17
16
|
|
18
17
|
def self.parse_date! date_string
|
@@ -33,6 +32,11 @@ module Anjlab
|
|
33
32
|
end
|
34
33
|
end
|
35
34
|
|
35
|
+
def self.format_date date
|
36
|
+
return '' if date.nil?
|
37
|
+
date.strftime self.date_format
|
38
|
+
end
|
39
|
+
|
36
40
|
def self.parse_time! time_string
|
37
41
|
return nil if date_string.blank?
|
38
42
|
now = Time.now
|
@@ -61,5 +65,10 @@ module Anjlab
|
|
61
65
|
nil
|
62
66
|
end
|
63
67
|
end
|
68
|
+
|
69
|
+
def self.format_time time
|
70
|
+
nil if time.nil?
|
71
|
+
time.strftime "%H:%M"
|
72
|
+
end
|
64
73
|
end
|
65
74
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anjlab-widgets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -165,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
165
165
|
version: '0'
|
166
166
|
segments:
|
167
167
|
- 0
|
168
|
-
hash:
|
168
|
+
hash: 180861906059628872
|
169
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
170
|
none: false
|
171
171
|
requirements:
|
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
version: '0'
|
175
175
|
segments:
|
176
176
|
- 0
|
177
|
-
hash:
|
177
|
+
hash: 180861906059628872
|
178
178
|
requirements: []
|
179
179
|
rubyforge_project:
|
180
180
|
rubygems_version: 1.8.22
|