First Commit

This commit is contained in:
2024-12-02 15:11:30 +01:00
commit 031f6004de
4688 changed files with 441558 additions and 0 deletions

15
Scripts/days_since.js Normal file
View File

@@ -0,0 +1,15 @@
/**
* Calculates the number of days since a given date.
*
* @param {string} day_string - The start date in "YYYY-MM-DD" format.
* @returns {number} The number of days since the start date.
*/
function days_since (day_string) {
var start_date = moment(day_string, "YYYY-MM-DD");
var today = moment();
var duration = moment.duration(today.diff(start_date));
var days_since = parseInt(duration.asDays());
return days_since;
}
module.exports = days_since;