aboutsummaryrefslogtreecommitdiff
path: root/src/modules/date
diff options
context:
space:
mode:
authorMatt Mayer <[email protected]>2023-03-29 20:36:46 +0700
committerGitHub <[email protected]>2023-03-29 13:36:46 +0000
commit3562e872530b3610d95be71aa6f4f7fdfef7134f (patch)
treec6ba28a9f3cf30e5bf5c0a935fead6bdb2668531 /src/modules/date
parent88e561a5490003a41665eb007c5c28ff0800ae09 (diff)
downloadfaker-3562e872530b3610d95be71aa6f4f7fdfef7134f.tar.xz
faker-3562e872530b3610d95be71aa6f4f7fdfef7134f.zip
docs: add overview guides to specific modules (#1929)
Diffstat (limited to 'src/modules/date')
-rw-r--r--src/modules/date/index.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/modules/date/index.ts b/src/modules/date/index.ts
index 7156bf22..76987735 100644
--- a/src/modules/date/index.ts
+++ b/src/modules/date/index.ts
@@ -24,6 +24,18 @@ function toDate(
/**
* Module to generate dates.
+ *
+ * ### Overview
+ *
+ * To quickly generate a date in the past, use [`recent()`](https://next.fakerjs.dev/api/date.html#recent) (last day) or [`past()`](https://next.fakerjs.dev/api/date.html#past) (last year).
+ * To quickly generate a date in the future, use [`soon()`](https://next.fakerjs.dev/api/date.html#soon) (next day) or [`future()`](https://next.fakerjs.dev/api/date.html#future) (next year).
+ * For a realistic birthdate for an adult, use [`birthdate()`](https://next.fakerjs.dev/api/date.html#birthdate).
+ *
+ * For more control, any of these methods can be customized with further options, or use [`between()`](https://next.fakerjs.dev/api/date.html#between) to generate a single date between two dates, or [`betweens()`](https://next.fakerjs.dev/api/date.html#betweens) for multiple dates.
+ *
+ * You can generate random localized month and weekday names using [`month()`](https://next.fakerjs.dev/api/date.html#month) and [`weekday()`](https://next.fakerjs.dev/api/date.html#weekday).
+ *
+ * These methods have additional concerns about reproducibility, see [Reproducible Results](https://next.fakerjs.dev/guide/usage.html#reproducible-results).
*/
export class DateModule {
constructor(private readonly faker: Faker) {