3 ms·
Because the relative date function that powers that label rounds to the nearest year (it also treats 360 days as a year): timeAgoFromMs(ms) { const
by banana_giraffe 5y ago
Because the relative date function that powers that label rounds to the nearest year (it also treats 360 days as a year):
timeAgoFromMs(ms) {
const sec = Math.round(ms / 1000);
const min = Math.round(sec / 60);
const hr = Math.round(min / 60);
const day = Math.round(hr / 24);
const month = Math.round(day / 30);
const year = Math.round(month / 12);
From https://github.githubassets.com/assets/javascript/node_modules/@github/time-elements/dist/index.js https://github.githubassets.com/assets/javascript/node_modul...