chronic_between 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +1 -1
- data.tar.gz.sig +0 -0
- data/lib/chronic_between.rb +6 -5
- metadata +27 -24
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7e2865012a80e1f1b4a3fcaf61ff9fe58dbc4e78a5a3d0d7b3f11fbfe77c9fc5
|
4
|
+
data.tar.gz: 24917faa9f82dd24a0bb77d69ad634a848fd2ab7f591543683c267b07a37cff2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ae97ebee98bd804fb629e19cb43f43b89454524e3c352ad164358c734743f319588d4e29f9f075f633644e3a6278681843956e8e6489246c61b1946493e0f34
|
7
|
+
data.tar.gz: 84b766228dbeace64509714a112e470c70b68c139265f3165f0121970ab2be9804324e3ca8a7c2008cb95c364059a6019c3fd77369a176a90808fe85159eb1bf
|
checksums.yaml.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
��N.�ȕ�u
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/chronic_between.rb
CHANGED
@@ -19,6 +19,7 @@ class ChronicBetween
|
|
19
19
|
|
20
20
|
date = raw_date.respond_to?(:to_datetime) ? raw_date.to_datetime : raw_date
|
21
21
|
@timezone = date.strftime("%z")
|
22
|
+
@params[:timezone] = @timezone
|
22
23
|
@year = date.year
|
23
24
|
dates = []
|
24
25
|
|
@@ -117,17 +118,17 @@ class ChronicBetween
|
|
117
118
|
end
|
118
119
|
|
119
120
|
# e.g. after 6pm
|
120
|
-
get
|
121
|
+
get /^after\s+(\d[\w:]*)$/i do
|
121
122
|
t1 = params[:captures].first
|
122
|
-
date1 = DateTime.parse(date.strftime("%d-%b-%y ") + t1)
|
123
|
+
date1 = DateTime.parse(date.strftime("%d-%b-%y ") + t1 + ' ' + params[:timezone])
|
123
124
|
date2 = DateTime.parse((date + 1).strftime("%d-%b-%y ") + '00:00')
|
124
125
|
[date1, date2]
|
125
126
|
end
|
126
127
|
|
127
128
|
# e.g. before 9pm
|
128
|
-
get
|
129
|
+
get /^before\s+(\d[\w:]*)$/i do
|
129
130
|
t1 = params[:captures].first
|
130
|
-
date2 = DateTime.parse(date.strftime("%d-%b-%y ") + t1)
|
131
|
+
date2 = DateTime.parse(date.strftime("%d-%b-%y ") + t1 + ' ' + params[:timezone])
|
131
132
|
date1 = DateTime.parse(date.strftime("%d-%b-%y") + ' 00:00')
|
132
133
|
[date1, date2]
|
133
134
|
end
|
@@ -200,4 +201,4 @@ class ChronicBetween
|
|
200
201
|
|
201
202
|
alias datetime_range time_range
|
202
203
|
|
203
|
-
end
|
204
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chronic_between
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,28 +10,32 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
+
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
13
|
+
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMjAwODE4MTcwMTA1WhcN
|
15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EbNbLmzBJQeHjUQJAyb
|
30
|
+
4YSXeAXgsGXi3KXZRKwr76hIsuy+1/lX5SMyfGFrRxeZZbj4kBX2J7ro78zFUCFx
|
31
|
+
755lm8NO/33fxzhoQ1KyooiJE+hWCFfUmKfxdDmj6ufWnTz39O2vTHxLV9ErmyiP
|
32
|
+
uVWUHcbLoUUwD9lDzC8sfgywpVK+wMTX3KoIbxWDbLV7T0YYwXPipNNao6YVjg3c
|
33
|
+
6YAndyTrY7nytVYX0phechPNprMvacxKtHvyWPTOY3JxgfW/drVSQfBeQH2Urezn
|
34
|
+
qYLkS0jCgesFuRz6AbSvvufxl8sJUwRwoyEy6BGP/iY6TxWq6g7VyuNdHlMwAiZ6
|
35
|
+
Ne+ahcHAtwCL3/OPMC7V9VQfw400l8Gx8gnhXY+vg37QXrdjt1Aq6cSlHhdnQJkr
|
36
|
+
+UWA0LSKYjup6Y8u3MMD7/Lf
|
33
37
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
38
|
+
date: 2020-08-18 00:00:00.000000000 Z
|
35
39
|
dependencies:
|
36
40
|
- !ruby/object:Gem::Dependency
|
37
41
|
name: chronic
|
@@ -99,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
103
|
- !ruby/object:Gem::Version
|
100
104
|
version: '0'
|
101
105
|
requirements: []
|
102
|
-
|
103
|
-
rubygems_version: 2.6.8
|
106
|
+
rubygems_version: 3.0.3
|
104
107
|
signing_key:
|
105
108
|
specification_version: 4
|
106
109
|
summary: chronic_between
|
metadata.gz.sig
CHANGED
Binary file
|