Created
July 25, 2023 05:18
-
-
Save andirkh/8754cb382721ec063f390da64fe75633 to your computer and use it in GitHub Desktop.
get last x days
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getLastDays = (day) => Array.from({ length: day }, (_, i) => new Date(Date.now() - i * 24 * 60 * 60 * 1000)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment