aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/date/index.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/date/index.ts b/src/modules/date/index.ts
index 06890a5d..e2565cf4 100644
--- a/src/modules/date/index.ts
+++ b/src/modules/date/index.ts
@@ -550,6 +550,11 @@ export class SimpleDateModule extends SimpleModuleBase {
*
* For more control, any of these methods can be customized with further options, or use [`between()`](https://fakerjs.dev/api/date.html#between) to generate a single date between two dates, or [`betweens()`](https://fakerjs.dev/api/date.html#betweens) for multiple dates.
*
+ * If you need to generate a date range (start-end), you can do so using either of these two methods:
+ *
+ * - `const start = faker.date.soon(); const end = faker.date.soon({ refDate: start });`
+ * - `const [start, end] = faker.date.betweens({ from, to, count: 2 });` // does not work with tsconfig's `noUncheckedIndexedAccess: true`
+ *
* Dates can be specified as Javascript Date objects, strings or UNIX timestamps.
* For example to generate a date between 1st January 2000 and now, use:
* ```ts