Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why does GitHub say 40 years ago when 1983 is 39 years 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_modul...


Wow! They added a markdown formatted code of conduct 40 years ago!!


They even reference "Windows Store app package directories and files"[0]. Very futurist thinking!

[0]: https://github.com/microsoft/GW-BASIC/blob/edf82c2ebf6bfe099...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: