From 6fc387c44b5638aa71e9500b13216be97e7e0cd4 Mon Sep 17 00:00:00 2001 From: thibdrev Date: Wed, 20 Oct 2021 11:04:01 +0200 Subject: [PATCH] Update utils.js clarifications on the formatDate() function --- packages/cozy-konnector-libs/src/libs/utils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/cozy-konnector-libs/src/libs/utils.js b/packages/cozy-konnector-libs/src/libs/utils.js index c71a095d8..a6c7d6cfa 100644 --- a/packages/cozy-konnector-libs/src/libs/utils.js +++ b/packages/cozy-konnector-libs/src/libs/utils.js @@ -272,20 +272,20 @@ module.exports = { } /** - * This function convert a Date Object to a ISO date string (2018-07-31) + * This function converts a Date Object to its ISO format string ("YYYY-MM-DD") * * Parameters: * - * `date` (Date): the id of the file in the cozy + * `date` (Date): a Date Object * * Returns a string * * Example: * * ```javascript - * const date = formatFrenchDate(New Date.now()) + * const date = formatDate(New Date.now()) * ``` */ function formatDate(date) { - return format(new Date(date), 'yyyy-MM-dd') + return format(new Date(date), 'YYYY-MM-DD') }