From d9feb6277475716bbadc8b4260cc4a1fbc19ffb6 Mon Sep 17 00:00:00 2001 From: Anna Date: Wed, 9 Oct 2024 15:07:19 -0400 Subject: [PATCH] fix(curriculum): add more buffer time lab data conversion (#56606) --- .../lab-date-conversion/66f686b8ebdb982fa8e14330.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/english/25-front-end-development/lab-date-conversion/66f686b8ebdb982fa8e14330.md b/curriculum/challenges/english/25-front-end-development/lab-date-conversion/66f686b8ebdb982fa8e14330.md index 4afb26e2706..b0c31ce35b0 100644 --- a/curriculum/challenges/english/25-front-end-development/lab-date-conversion/66f686b8ebdb982fa8e14330.md +++ b/curriculum/challenges/english/25-front-end-development/lab-date-conversion/66f686b8ebdb982fa8e14330.md @@ -43,13 +43,12 @@ assert.equal(currentDateOnly.toString(), expectedDateOnly.toString()); You should have a variable named `currentDateFormat` that holds the current date in the format `Current Date and Time:
:: `. ```js -const expectedDate = new Date(); const expectedDateString = `Current Date and Time: `; assert.include(currentDateFormat, expectedDateString); const currentTimestamp = new Date(currentDateFormat.replace(expectedDateString, '')).getTime(); -const expectedTimestamp = expectedDate.getTime(); -assert.approximately(currentTimestamp, expectedTimestamp, 1000); +const expectedTimestamp = new Date().getTime(); +assert.approximately(currentTimestamp, expectedTimestamp, 2000); ``` You should log the value of `currentDateFormat` to the console.