diff --git a/src/date.py b/src/date.py
index 7268dca..97d3ca6 100644
--- a/src/date.py
+++ b/src/date.py
@@ -87,7 +87,7 @@ class Date():
 
         if matches:
             try:
-                match_dir = matches.groupdict()
+                match_dir = matches.groupdict(default='0')
                 match_dir = dict([a, int(x)] for a, x in match_dir.items())  # Convert str to int
                 date = self.build(match_dir)
             except (KeyError, ValueError):

diff --git a/tests/test_date.py b/tests/test_date.py
index 9d02975..226cf64 100644
--- a/tests/test_date.py
+++ b/tests/test_date.py
@@ -105,3 +105,14 @@ def test_get_date_custom_regex_no_match():
     """
     date_regex = re.compile(r"(?P<day>\d{2})\.(?P<month>\d{2})\.(?P<year>\d{4})[_-]?(?P<hour>\d{2})\.(?P<minute>\d{2})\.(?P<second>\d{2})")
     assert Date("Foo.jpg").from_exif({}, False, date_regex) is None
+
+def test_get_date_custom_regex_optional_time():
+    """
+    A valid regex with a matching filename that doesn't have hour information.
+    However, the regex in question has hour information as optional.
+    """
+    date_regex = re.compile(r"(?P<day>\d{2})\.(?P<month>\d{2})\.(?P<year>\d{4})[_-]?((?P<hour>\d{2})\.(?P<minute>\d{2})\.(?P<second>\d{2}))?")
+    assert Date("IMG_27.01.2015.jpg").from_exif({}, False, date_regex) == {
+        "date": datetime(2015, 1, 27, 0, 0, 00),
+        "subseconds": ""
+    }

Regex on filenames with optional hour info
A bit of an extension of #55 

If we have a regex that accepts hour information, yet has it as optional, phockup will crash.

Assuming the following custom regex:
`(?P<day>\d{2})\.(?P<month>\d{2})\.(?P<year>\d{4})[_-]?((?P<hour>\d{2})\.(?P<minute>\d{2})\.(?P<second>\d{2}))?`
and the following filename: `IMG_27.01.2015.jpg`

In date.py
`match_dir = matches.groupdict()`
will still create keys for hour information, but their values will be None.

`match_dir = dict([a, int(x)] for a, x in match_dir.items()) `
will consequently crash when casting NoneType to Int


tests/test_date.py::test_get_date_custom_regex_optional_time
tests/test_date.py::test_parse_date_format_valid tests/test_date.py::test_get_date_from_exif tests/test_date.py::test_get_date_from_exif_strip_timezone tests/test_date.py::test_get_date_from_exif_colon tests/test_date.py::test_get_date_from_exif_subseconds tests/test_date.py::test_get_date_from_exif_invalid tests/test_date.py::test_get_date_from_filename tests/test_date.py::test_get_date_filename_invalid tests/test_date.py::test_get_date_none_on_no_info tests/test_date.py::test_get_date_none_on_no_error tests/test_date.py::test_get_date_custom_regex tests/test_date.py::test_get_date_custom_regex_invalid tests/test_date.py::test_get_date_custom_regex_no_match