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