vault backup: 2025-02-05 14:38:06

This commit is contained in:
2025-02-05 14:38:07 +01:00
parent 6ae96b0862
commit 23fd82117a
3738 changed files with 218546 additions and 24 deletions

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;