drexed-datetime 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/drexed/datetime.rb +1 -0
- data/lib/drexed/datetime/version.rb +1 -1
- data/lib/drexed/datetime_helper.rb +91 -0
- data/lib/drexed/railtie.rb +9 -0
- metadata +3 -2
- data/app/helpers/datetime_helper.rb +0 -87
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6546f8a8de47181ce862f7e24c208fc50230ab44
|
4
|
+
data.tar.gz: d3807370e4f1cedb41421293f697b6e4238740ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e534c9e9e65806340fc7d797abd27655ebfd765676ce72c1cd6f17876bbb11823ffa198a6d3b1a20277add68ce46c30b4cdecc86577854e0f7e72a1c561626e
|
7
|
+
data.tar.gz: dd0356df2d239c86e308854e316b912e9e35442939e94b8923bd926c7840f71605ebe3bdb6b31fdae97de9c0127e56cb35de04c6bfd8921d8251822117d62c53
|
data/lib/drexed/datetime.rb
CHANGED
@@ -0,0 +1,91 @@
|
|
1
|
+
module Drexed
|
2
|
+
module Datetime
|
3
|
+
module DatetimeHelper
|
4
|
+
|
5
|
+
def month_day_and_time_for(tach)
|
6
|
+
unless tach.blank?
|
7
|
+
tach.strftime("%B %e at %I:%M %p")
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def date_time_for(tach)
|
12
|
+
unless tach.blank?
|
13
|
+
tach.strftime("%B %e, %Y at %I:%M %p")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def date_for(tach)
|
18
|
+
unless tach.blank?
|
19
|
+
tach.strftime("%B %e, %Y")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def twenty_four_hour_time_for(tach)
|
24
|
+
unless tach.blank?
|
25
|
+
tach.strftime("%H:%M")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def twelve_hour_time_for(tach)
|
30
|
+
unless tach.blank?
|
31
|
+
tach.strftime("%I:%M %p")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def month_name_for(tach)
|
36
|
+
unless tach.blank?
|
37
|
+
tach.strftime("%B")
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def abbr_month_name_for(tach)
|
42
|
+
unless tach.blank?
|
43
|
+
tach.strftime("%b")
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def day_name_for(tach)
|
48
|
+
unless tach.blank?
|
49
|
+
tach.strftime("%A")
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def day_number_for(tach)
|
54
|
+
unless tach.blank?
|
55
|
+
tach.strftime("%e")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def abbr_day_name_for(tach)
|
60
|
+
unless tach.blank?
|
61
|
+
tach.strftime("%a")
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def abbr_month_and_day_for(tach)
|
66
|
+
unless tach.blank?
|
67
|
+
tach.strftime("%b %d")
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def abbr_date_for(tach)
|
72
|
+
unless tach.blank?
|
73
|
+
tach.strftime("%b %d, %Y")
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def abbr_date_time(tach)
|
78
|
+
unless tach.blank?
|
79
|
+
tach.strftime("%b %d, %Y at %I:%M %p")
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def timezone_name_for(tach)
|
84
|
+
unless tach.blank?
|
85
|
+
tach.strftime("%Z")
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drexed-datetime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
@@ -50,10 +50,11 @@ files:
|
|
50
50
|
- LICENSE.txt
|
51
51
|
- README.md
|
52
52
|
- Rakefile
|
53
|
-
- app/helpers/datetime_helper.rb
|
54
53
|
- drexed-datetime.gemspec
|
55
54
|
- lib/drexed/datetime.rb
|
56
55
|
- lib/drexed/datetime/version.rb
|
56
|
+
- lib/drexed/datetime_helper.rb
|
57
|
+
- lib/drexed/railtie.rb
|
57
58
|
homepage: https://github.com/drexed/drexed-datetime
|
58
59
|
licenses:
|
59
60
|
- MIT
|
@@ -1,87 +0,0 @@
|
|
1
|
-
module DatetimeHelper
|
2
|
-
|
3
|
-
def month_day_and_time_for(tach)
|
4
|
-
unless tach.blank?
|
5
|
-
tach.strftime("%B %e at %I:%M %p")
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
def date_time_for(tach)
|
10
|
-
unless tach.blank?
|
11
|
-
tach.strftime("%B %e, %Y at %I:%M %p")
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
def date_for(tach)
|
16
|
-
unless tach.blank?
|
17
|
-
tach.strftime("%B %e, %Y")
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def twenty_four_hour_time_for(tach)
|
22
|
-
unless tach.blank?
|
23
|
-
tach.strftime("%H:%M")
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def twelve_hour_time_for(tach)
|
28
|
-
unless tach.blank?
|
29
|
-
tach.strftime("%I:%M %p")
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def month_name_for(tach)
|
34
|
-
unless tach.blank?
|
35
|
-
tach.strftime("%B")
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def abbr_month_name_for(tach)
|
40
|
-
unless tach.blank?
|
41
|
-
tach.strftime("%b")
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def day_name_for(tach)
|
46
|
-
unless tach.blank?
|
47
|
-
tach.strftime("%A")
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
def day_number_for(tach)
|
52
|
-
unless tach.blank?
|
53
|
-
tach.strftime("%e")
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
def abbr_day_name_for(tach)
|
58
|
-
unless tach.blank?
|
59
|
-
tach.strftime("%a")
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
def abbr_month_and_day_for(tach)
|
64
|
-
unless tach.blank?
|
65
|
-
tach.strftime("%b %d")
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
def abbr_date_for(tach)
|
70
|
-
unless tach.blank?
|
71
|
-
tach.strftime("%b %d, %Y")
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
def abbr_date_time(tach)
|
76
|
-
unless tach.blank?
|
77
|
-
tach.strftime("%b %d, %Y at %I:%M %p")
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
def timezone_name_for(tach)
|
82
|
-
unless tach.blank?
|
83
|
-
tach.strftime("%Z")
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
end
|