From 01b5d2acc509ab01dc4be2ba8fdfba7fb72044c2 Mon Sep 17 00:00:00 2001 From: Matt Mayer <152770+matthewmayer@users.noreply.github.com> Date: Tue, 30 Jan 2024 07:30:24 +0700 Subject: [PATCH 1/2] docs: clarify that the result of faker.date.betweens() is sorted Inspired by https://github.com/faker-js/faker/discussions/2633 - wasn't obvious from the docs that the result was sorted. --- src/modules/date/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/date/index.ts b/src/modules/date/index.ts index 9b96e704079..45157c25695 100644 --- a/src/modules/date/index.ts +++ b/src/modules/date/index.ts @@ -409,7 +409,7 @@ export class SimpleDateModule extends SimpleModuleBase { } /** - * Generates random dates between the given boundaries. + * Generates random dates between the given boundaries. The dates will be returned in an array sorted from oldest to newest. * * @param options The optional options object. * @param options.from The early date boundary. From 5a0019f196999e2bf4694a666f1194ebd5f92100 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Mon, 5 Feb 2024 23:18:55 +0100 Subject: [PATCH 2/2] Update src/modules/date/index.ts --- src/modules/date/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/date/index.ts b/src/modules/date/index.ts index 45157c25695..9e8002d2d9c 100644 --- a/src/modules/date/index.ts +++ b/src/modules/date/index.ts @@ -409,7 +409,7 @@ export class SimpleDateModule extends SimpleModuleBase { } /** - * Generates random dates between the given boundaries. The dates will be returned in an array sorted from oldest to newest. + * Generates random dates between the given boundaries. The dates will be returned in an array sorted in chronological order. * * @param options The optional options object. * @param options.from The early date boundary.