MCPcopy Create free account
hub / github.com/AntonPalmqvist/physically-based-api / getCurrentDateAsNumber

Function getCurrentDateAsNumber

scripts/pre-commit.mjs:5–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4// Get current date as YYYYMMDDHHmm
5function getCurrentDateAsNumber() {
6 const now = new Date();
7 const year = now.getFullYear();
8 const month = String(now.getMonth() + 1).padStart(2, "0");
9 const day = String(now.getDate()).padStart(2, "0");
10 const hours = String(now.getHours()).padStart(2, "0");
11 const minutes = String(now.getMinutes()).padStart(2, "0");
12 return parseInt(`${year}${month}${day}${hours}${minutes}`, 10);
13}
14
15async function updateDatabaseVersion(filePath) {
16 try {

Callers 1

updateDatabaseVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected