CosmoAI commited on
Commit
3abd141
·
1 Parent(s): cf74854

Update getvalues.py

Browse files
Files changed (1) hide show
  1. getvalues.py +6 -6
getvalues.py CHANGED
@@ -24,7 +24,7 @@ def findTime(input):
24
  # meridian = time_search.group(2)
25
  return time
26
  else:
27
- return "notime"
28
 
29
  # find number in the string input provided by the user
30
  def findNumber(input):
@@ -32,7 +32,7 @@ def findNumber(input):
32
  if number:
33
  return number.group()
34
  else:
35
- return "nonum"
36
 
37
  # # find date in the string input provided by the user
38
  def findDate(input):
@@ -40,7 +40,7 @@ def findDate(input):
40
  if date:
41
  return date.group()
42
  else:
43
- return "nodate"
44
 
45
  # find month in the string input provided by the user
46
  def findMonth(input):
@@ -48,7 +48,7 @@ def findMonth(input):
48
  if month:
49
  return month.group()
50
  else:
51
- return "nomonth"
52
 
53
  # find day in the string input provided by the user
54
  def findDay(input):
@@ -56,14 +56,14 @@ def findDay(input):
56
  if day:
57
  return day.group()
58
  else:
59
- return "noday"
60
 
61
  def findrepeat(input):
62
  repeat = re.search(r'\b(daily|everyday|every week|every month|every sunday|every monday|every tuesday|every wednesday|every thursday|every friday|every saturday)\b', input)
63
  if repeat:
64
  return repeat.group()
65
  else:
66
- return "norepeat"
67
 
68
 
69
  def getValues(query):
 
24
  # meridian = time_search.group(2)
25
  return time
26
  else:
27
+ return None
28
 
29
  # find number in the string input provided by the user
30
  def findNumber(input):
 
32
  if number:
33
  return number.group()
34
  else:
35
+ return None
36
 
37
  # # find date in the string input provided by the user
38
  def findDate(input):
 
40
  if date:
41
  return date.group()
42
  else:
43
+ return None
44
 
45
  # find month in the string input provided by the user
46
  def findMonth(input):
 
48
  if month:
49
  return month.group()
50
  else:
51
+ return None
52
 
53
  # find day in the string input provided by the user
54
  def findDay(input):
 
56
  if day:
57
  return day.group()
58
  else:
59
+ return None
60
 
61
  def findrepeat(input):
62
  repeat = re.search(r'\b(daily|everyday|every week|every month|every sunday|every monday|every tuesday|every wednesday|every thursday|every friday|every saturday)\b', input)
63
  if repeat:
64
  return repeat.group()
65
  else:
66
+ return None
67
 
68
 
69
  def getValues(query):