aboutsummaryrefslogtreecommitdiff
path: root/src/modules/date
diff options
context:
space:
mode:
authorSamuel Koch <[email protected]>2023-11-13 05:07:05 -0300
committerGitHub <[email protected]>2023-11-13 09:07:05 +0100
commit7ce8c285cb5b2d13e95a17be78ecbd52f3c7d9db (patch)
tree4c541c1d86ff332c54b2ec0d93a541d05bc6db44 /src/modules/date
parentef965da48a8089e6bb19bcf260bfcd8af1a43799 (diff)
downloadfaker-7ce8c285cb5b2d13e95a17be78ecbd52f3c7d9db.tar.xz
faker-7ce8c285cb5b2d13e95a17be78ecbd52f3c7d9db.zip
fix(date): ensures correct range for birthdate (#2535)
Diffstat (limited to 'src/modules/date')
-rw-r--r--src/modules/date/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/date/index.ts b/src/modules/date/index.ts
index 69854688..d79da51f 100644
--- a/src/modules/date/index.ts
+++ b/src/modules/date/index.ts
@@ -890,7 +890,7 @@ export class SimpleDateModule extends SimpleModuleBase {
options.min ?? refYear - 80
);
max = new Date(Date.UTC(0, 11, 30)).setUTCFullYear(
- options.max ?? refYear - 18
+ options.max ?? refYear - 19
);
}