Created
October 11, 2022 17:27
-
-
Save scolton99/ecad83cbb67f3bb1c63812ed99a40892 to your computer and use it in GitHub Desktop.
Create headings for the "What did you work on today?" Confluence documents.
This file contains hidden or 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 generateHeadings = () => { | |
let date = new Date('2023-08-31T00:00:00'); | |
date.setHours(0); | |
date.setMinutes(0); | |
date.setSeconds(0); | |
date.setMilliseconds(0); | |
for (; date.getTime() >= Date.parse('2023-06-01T00:00:00'); date.setDate(date.getDate() - 1)) { | |
if (date.getDay() === 0 || date.getDay() === 6) | |
continue; | |
const dateStr = date.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }); | |
console.log(`# ${dateStr}\n* \n`); | |
} | |
}; | |
generateHeadings(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment