Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Recognize a year.
James Cole1c3fe93d592d
diff --git a/app/Support/ParseDateString.php b/app/Support/ParseDateString.phpindex 0b85a98372..10a5f6fcca 100644--- a/app/Support/ParseDateString.php+++ b/app/Support/ParseDateString.php@@ -89,6 +89,10 @@ class ParseDateString// cant handle date ranges.return new Carbon('1984-09-17');}+ // maybe a year, nothing else?+ if (4 === strlen($date) && is_numeric($date) && (int) $date > 1000 && (int) $date <= 3000) {+ return new Carbon(sprintf('%d-01-01', $date));+ }throw new FireflyException(sprintf('[d]Not a recognised date format: "%s"', $date));}