MCPcopy Create free account
hub / github.com/monkeytypegame/monkeytype / getDateVersion

Function getDateVersion

backend/src/version.ts:8–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6const { COMMIT_HASH = "NO_HASH" } = process.env;
7
8function getDateVersion(): string {
9 const date = new Date();
10
11 const versionPrefix = [
12 date.getFullYear(),
13 date.getMonth() + 1,
14 date.getDate(),
15 ];
16 const versionSuffix = [date.getHours(), date.getMinutes()];
17
18 return [versionPrefix, versionSuffix]
19 .map((versionPart) => padNumbers(versionPart, 2, "0").join("."))
20 .join("_");
21}
22
23function getVersion(): string {
24 if (isDevEnvironment()) {

Callers 1

getVersionFunction · 0.85

Calls 1

padNumbersFunction · 0.90

Tested by

no test coverage detected