aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/guide/upgrading_v9/2757.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/guide/upgrading_v9/2757.md b/docs/guide/upgrading_v9/2757.md
new file mode 100644
index 00000000..c7a79577
--- /dev/null
+++ b/docs/guide/upgrading_v9/2757.md
@@ -0,0 +1,9 @@
+### Fail on invalid dates
+
+Various methods in the `faker.date` module allow you to pass a `Date`-ish value:
+that is, either a Javascript Date, or a timestamp number or string that can be converted to a `Date` via the `new Date()` constructor.
+
+Previously, if you passed something which could not be parsed to a `Date`, it would fall back to the current reference date.
+Now, this throws an error raising awareness of that bad value.
+
+This affects the `refDate` parameter of the `anytime()`, `birthdate()`, `past()`, `future()`, `recent()` and `soon()`, methods as well as the `from` and `to` parameters of `between()` and `betweens()`.