Repository: MycroftAI/lingua-franca

Issue:
extract_datetime("tonight") without explicit time returns only date
`extract_datetime("do something at 9 tonight", now)`
returns the date with time as 9pm correctly however,
`extract_datetime("do something tonight", now)`
returns the date but not a relevant time.

Would expect that if no explicit time (eg '9') is found, that it would revert to a relevant arbitrary value in the same way as [morning=8am, afternoon=3pm, evening=7pm].

Example utterances:
- "what's the weather like tonight"
- "remind me to take the rubbish out tonight"

Perhaps an unspecified tonight should equate to 9pm or later? Or are the use cases too dependent on the Skill?

Discussion:
krisgesling: Suggested some extra tests, that are already passing. Will let you decide if you want to add them, but this can be merged with or without them :)

Patch:
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index d21b2ce..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-branches:
-  only:
-    - master
-    - dev
-language: python
-python:
-  - "3.4"
-  - "3.5"
-  - "3.6"      # current default Python on Travis CI
-  - "3.7"
-# command to install dependencies
-install:
-  - pip install -r requirements.txt
-# command to run tests
-script:
-  - pytest
diff --git a/lingua_franca/lang/parse_en.py b/lingua_franca/lang/parse_en.py
index 9676121..7e9abd3 100644
--- a/lingua_franca/lang/parse_en.py
+++ b/lingua_franca/lang/parse_en.py
@@ -899,6 +899,11 @@ def extract_datetime_en(string, dateNow, default_time):
             if hrAbs is None:
                 hrAbs = 19
             used += 1
+        elif word == "tonight" or word == "night":
+            if hrAbs is None:
+                hrAbs = 22
+            #used += 1 ## NOTE this breaks other tests, TODO refactor me!
+
         # couple of time_unit
         elif word == "2" and wordNext == "of" and \
                 wordNextNext in ["hours", "minutes", "seconds"]:
@@ -920,6 +925,8 @@ def extract_datetime_en(string, dateNow, default_time):
                 minOffset = 15
                 if idx > 2 and words[idx - 3] in markers:
                     words[idx - 3] = ""
+                    if words[idx - 3] == "this":
+                        daySpecified = True
                 words[idx - 2] = ""
             elif wordPrev == "within":
                 hrOffset = 1
diff --git a/readme.md b/readme.md
index 899ca41..4a3654d 100644
--- a/readme.md
+++ b/readme.md
@@ -1,6 +1,6 @@
 [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE.md) [![CLA](https://img.shields.io/badge/CLA%3F-Required-blue.svg)](https://mycroft.ai/cla) [![Team](https://img.shields.io/badge/Team-Languages-violetblue.svg)](https://github.com/MycroftAI/contributors/blob/master/team/Languages.md) ![Status](https://img.shields.io/badge/-Alpha-orange.svg)
 
-[![Build Status](https://travis-ci.org/MycroftAI/lingua-franca.svg?branch=master)](https://travis-ci.org/MycroftAI/lingua-franca) [![Coverage Status](https://coveralls.io/repos/github/MycroftAI/lingua-franca/badge.svg?branch=master)](https://coveralls.io/github/MycroftAI/lingua-franca?branch=master)
+[![Build Status](https://travis-ci.org/MycroftAI/mycroft-core.svg?branch=master)](https://travis-ci.org/MycroftAI/mycroft-core) [![Coverage Status](https://coveralls.io/repos/github/MycroftAI/lingua-franca/badge.svg?branch=dev)](https://coveralls.io/github/MycroftAI/lingua-franca?branch=dev)
 [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)
 [![Join chat](https://img.shields.io/badge/Mattermost-join_chat-brightgreen.svg)](https://chat.mycroft.ai/community/channels/languages)
 
diff --git a/setup.py b/setup.py
index d764562..4b9583f 100644
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,7 @@ setup(
     name='lingua_franca',
     version='0.1.0',
     packages=['test', 'lingua_franca', 'lingua_franca.lang'],
-    url='https://github.com/MycroftAI/lingua-franca',
+    url='https://github.com/MycroftAi/lingua_franca',
     license='Apache2.0',
     package_data={'': extra_files},
     include_package_data=True,


Test patch:
diff --git a/test/test_parse.py b/test/test_parse.py
index c1510d9..b010c5d 100644
--- a/test/test_parse.py
+++ b/test/test_parse.py
@@ -477,6 +477,19 @@ class TestNormalize(unittest.TestCase):
         testExtract("set alarm at 7:30 on weekdays",
                     "2017-06-27 19:30:00", "set alarm on weekdays")
 
+        # TODO this test is imperfect due to "tonight" in the reminder, but let is pass since the date is correct
+        testExtract("lets meet tonight",
+                    "2017-06-27 22:00:00", "lets meet tonight")
+        # TODO this test is imperfect due to "at night" in the reminder, but let is pass since the date is correct
+        testExtract("lets meet later at night",
+                    "2017-06-27 22:00:00", "lets meet later at night")
+        # TODO this test is imperfect due to "night" in the reminder, but let is pass since the date is correct
+        testExtract("what's the weather like tomorrow night",
+                    "2017-06-28 22:00:00", "what is weather like night")
+        # TODO this test is imperfect due to "night" in the reminder, but let is pass since the date is correct
+        testExtract("what's the weather like next tuesday night",
+                    "2017-07-04 22:00:00", "what is weather like night")
+
     def test_extract_ambiguous_time_en(self):
         morning = datetime(2017, 6, 27, 8, 1, 2)
         evening = datetime(2017, 6, 27, 20, 1, 2)