Alpha Version Names
Example: Alpha-2023y-91d-840m
The first part of the version name is just a prefix, in this case Alpha-.
The second part is the current year, 2023y- (2023).
The third part is the day of the year, in the example this is 91d-. (April 1st)
The fourth and final part is the number of minutes since midnight (UTC), in the example this is 840m. (2pm)
Example Code
// JavaScriptfunction generateVersionName(prefix) { let now = new Date(); // Current time right now
let dayOfYear = (function() { let start = new Date(now.getFullYear(), 0, 0); let diff = now - start; let oneDay = 1000 * 60 * 60 * 24; return Math.floor(diff / oneDay); })();
let year = now.getUTCFullYear();
let minutesSinceMidnight = now.getUTCHours() * 60 + now.getUTCMinutes();
let versionName = `${prefix}-${year}y-${dayOfYear}d-${minutesSinceMidnight}m`
return versionName;}
console.log(generateVersionName('Alpha'));