fugit 1.3.6 → 1.3.8
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fugit might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/CREDITS.md +1 -0
- data/README.md +1 -1
- data/lib/fugit.rb +1 -1
- data/lib/fugit/nat.rb +15 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86abe0dec557524b3ae8c7947f48ab15a52e49b240ecdb3f4103c916348e6e4c
|
4
|
+
data.tar.gz: d440e0d52d49b6ad2893b05c269b7c6f96936cfcb4a3904750b3204568d2344a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13fe87e6bc9d37cf3822c1bed665651be254b8e4a3d262f20950dc6f14d6170495721a0cd79ca8324b35048d90ce71d996b654f23da2b4780df536b9f4bd8071
|
7
|
+
data.tar.gz: 2623e274a96a689639fbbbcc22f77bc86f8bcc0f49644e459673a54eadfd39deecf8158b85948b6969339b7d6c9e2554537aa4c6575f63a56fd0333626b0ed88
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,16 @@
|
|
2
2
|
# CHANGELOG.md
|
3
3
|
|
4
4
|
|
5
|
+
## fugit 1.3.8 released 2020-08-06
|
6
|
+
|
7
|
+
* Parse 'every day at 8:30' and ' at 8:30 pm', gh-42
|
8
|
+
|
9
|
+
|
10
|
+
## fugit 1.3.7 released 2020-08-05
|
11
|
+
|
12
|
+
* Parse 'every 12 hours at minute 50', gh-41
|
13
|
+
|
14
|
+
|
5
15
|
## fugit 1.3.6 released 2020-06-01
|
6
16
|
|
7
17
|
* Introduce new nat syntaxed, gh-38
|
data/CREDITS.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
|
2
2
|
# fugit credits
|
3
3
|
|
4
|
+
* Jérôme Dalbert https://github.com/jeromedalbert gh-41, gh-42
|
4
5
|
* Danny Ben Shitrit https://github.com/DannyBen nat variants, gh-38
|
5
6
|
* Dominik Sander https://github.com/dsander #rough_frequency 0, gh-36
|
6
7
|
* Milovan Zogovic https://github.com/assembler Cron#match? vs TZ, gh-31
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ Time tools for [flor](https://github.com/floraison/flor) and the floraison group
|
|
9
9
|
|
10
10
|
It uses [et-orbi](https://github.com/floraison/et-orbi) to represent time instances and [raabro](https://github.com/floraison/raabro) as a basis for its parsers.
|
11
11
|
|
12
|
-
Fugit is a core dependency of [rufus-scheduler](https://github.com/jmettraux/rufus-scheduler) 3.5.
|
12
|
+
Fugit is a core dependency of [rufus-scheduler](https://github.com/jmettraux/rufus-scheduler) >= 3.5.
|
13
13
|
|
14
14
|
|
15
15
|
## Related projects
|
data/lib/fugit.rb
CHANGED
data/lib/fugit/nat.rb
CHANGED
@@ -96,10 +96,14 @@ module Fugit
|
|
96
96
|
when 's', 'sec', 'second', 'seconds'
|
97
97
|
h[:sec] = eone(e)
|
98
98
|
when 'm', 'min', 'mins', 'minute', 'minutes'
|
99
|
-
#(h[:hms] ||= []) << [ '*', eone(e) ]
|
100
99
|
h[:hms] ||= [ [ '*', eone(e) ] ]
|
101
100
|
when 'h', 'hour', 'hours'
|
102
|
-
h[:hms]
|
101
|
+
hms = h[:hms]
|
102
|
+
if hms && hms.size == 1 && hms.first.first == '*'
|
103
|
+
hms.first[0] = eone(e)
|
104
|
+
elsif ! hms
|
105
|
+
h[:hms] = [ [ eone(e), 0 ] ]
|
106
|
+
end
|
103
107
|
when 'd', 'day', 'days'
|
104
108
|
h[:dom] = "*/#{e1}" if e1 > 1
|
105
109
|
h[:hms] ||= [ [ 0, 0 ] ]
|
@@ -268,8 +272,12 @@ rex(:xxx, i, 'TODO')
|
|
268
272
|
seq(:simple_hour, i, :shour, :am_pm, '?')
|
269
273
|
end
|
270
274
|
|
275
|
+
def dig_hour_b(i); rex(nil, i, /(2[0-4]|[01][0-9]|[0-9]):[0-5]\d/); end
|
276
|
+
def dig_hour_a(i); rex(nil, i, /(2[0-4]|[01][0-9])[0-5]\d/); end
|
277
|
+
def dig_hour(i); alt(nil, i, :dig_hour_a, :dig_hour_b); end
|
278
|
+
#
|
271
279
|
def digital_hour(i)
|
272
|
-
|
280
|
+
seq(:digital_hour, i, :dig_hour, :am_pm, '?')
|
273
281
|
end
|
274
282
|
|
275
283
|
def at_point(i)
|
@@ -473,8 +481,10 @@ rex(:xxx, i, 'TODO')
|
|
473
481
|
[ v, 0 ]
|
474
482
|
end
|
475
483
|
def rewrite_digital_hour(t)
|
476
|
-
m = t.string.match(/(\d\d?):?(\d\d)
|
477
|
-
|
484
|
+
m = t.string.match(/(\d\d?):?(\d\d)(\s+pm)?/i)
|
485
|
+
hou = m[1].to_i; hou += 12 if m[3] && hou < 12
|
486
|
+
min = m[2].to_i
|
487
|
+
[ hou, min ]
|
478
488
|
end
|
479
489
|
|
480
490
|
def rewrite_weekday(t)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fugit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Mettraux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06
|
11
|
+
date: 2020-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: raabro
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
|
-
rubygems_version: 3.
|
120
|
+
rubygems_version: 3.1.2
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: time tools for flor
|