event_nlp 0.6.7 → 0.6.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 246bf075ca72ce30cb7a2d8742909e72165b30a607de948cff0c69f031cc333e
4
- data.tar.gz: 5634642b23bb6b0dd5c5b6e411efb521929ca8e66808cf26a1503023777b7130
3
+ metadata.gz: 1200231cc34b803c923b8b4f83b03a7f9d4f97e5459b8ad0b28d90a8140bd024
4
+ data.tar.gz: af0a750f75290c985454611f61004df0e31b73be38f58857af60d8ef7ba62e25
5
5
  SHA512:
6
- metadata.gz: b692393ba9b24a0378afd6ce9c965e8f0e481374d76365824c645b1b28c10cbfe430a952ddceaceb5d8875d2b6f373b2fbeafda3fa3e27185d32efcfb39d17f6
7
- data.tar.gz: f75b6af7438aa329f57c074d47542e3c81318fa79d79bed033055f9ce569e8e25a211e2e08cb70c5341e550a0fd8473416787793b658aea2046dd2c51b60a3c4
6
+ metadata.gz: aa698ae6633855f0dbc21244c57283aa9bb0155aba6f2e43fc17d9d76a1aa0bbf520e1edf4cee2940738bdedee4ec1f01a52b61b98257e9ab974319e4ad36192
7
+ data.tar.gz: 83d534cda5ab96200952401ebde246701b30ce40fa8133f8badcb948f5edf9dbd7bdf6d209e718c32aa893cfcd227788a39c05163c0232492c6e261fa0142b35
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/event_nlp.rb CHANGED
@@ -53,7 +53,7 @@ class EventNlp
53
53
 
54
54
  # returns an Array object of dates, projected from a recurring event
55
55
  #
56
- def project(s, year: Time.now.year)
56
+ def project(s, year: @now.year)
57
57
 
58
58
  r0 = parse s
59
59
  r = parse r0.input
@@ -67,18 +67,19 @@ class EventNlp
67
67
  EventNlp.new(r.date+1).parse(r.input).date.inspect
68
68
  end
69
69
 
70
- return [r.date] if (r.date == EventNlp.new(r.date+1).parse(r.input).date)
70
+ return [r.date] if (r.date == EventNlp.new(r.date+1, debug: @debug).parse(r.input).date)
71
71
 
72
72
  while r.date.year == year.to_i do
73
73
 
74
74
  dates << r.date
75
75
  @now = if r.recurring == 'month' then
76
- (r.date.to_datetime >> 1).to_time
76
+ (r.date.to_date >> 1).to_time
77
77
  #elsif r.recurring == 'weekly'
78
78
 
79
79
  else
80
80
  r.date + 1
81
81
  end
82
+ puts '@now: ' + @now.inspect if @debug
82
83
  #@now = r.date + 1
83
84
  r = parse(r.input)
84
85
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event_nlp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7
4
+ version: 0.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  w8lJ+I6Lqqr5GpsweOnEHW4w200sMRD40u8qmGHrqirihL2KrwTD6A9UObvA5AxZ
36
36
  4Z4EPvKg+3jsK9Gv3GGSLdrD
37
37
  -----END CERTIFICATE-----
38
- date: 2022-05-03 00:00:00.000000000 Z
38
+ date: 2022-05-04 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: chronic_cron
metadata.gz.sig CHANGED
Binary file