Changed the fix for #12 again, because the previous implementation returned an array instead of a scalar value.
Refactoring: changed all datetimes to dates, because that's much more fitting to how they're used and simplifies various usages (e.g. string formatting is now implicit).