mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +01:00
Do not use UTC for alpha version
This commit is contained in:
parent
fc5cce23ea
commit
df039b0f3c
@ -16,8 +16,13 @@ const fs = require("fs");
|
|||||||
|
|
||||||
function getAlphaVersion(manifest, useTime){
|
function getAlphaVersion(manifest, useTime){
|
||||||
"use strict";
|
"use strict";
|
||||||
|
function f(n){
|
||||||
|
if (n < 10) return "0" + n.toString(10);
|
||||||
|
return n.toString(10);
|
||||||
|
}
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const date = now.toISOString().substring(0, useTime? 13: 10).replace(/-/g, "").replace("T", ".");
|
// const date = now.toISOString().substring(0, useTime? 13: 10).replace(/-/g, "").replace("T", ".");
|
||||||
|
const date = `${now.getFullYear()}${f(now.getMonth() + 1)}${f(now.getDate())}${useTime? "." + f(now.getHours): ""}`;
|
||||||
return manifest.version.replace(/^([\d.]+).*$/, "$1Alpha" + date);
|
return manifest.version.replace(/^([\d.]+).*$/, "$1Alpha" + date);
|
||||||
}
|
}
|
||||||
function getRCVersion(manifest){
|
function getRCVersion(manifest){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user