Sertion / vscode-gitblame

Visual Studio Code Extension - See Git Blame info in status bar.
https://marketplace.visualstudio.com/items/waderyan.gitblame
MIT License
75 stars 32 forks source link

Display years when relevant #21

Closed neerolyte closed 7 years ago

neerolyte commented 7 years ago

The average age of the code base I mostly work on is probably around 7 years (some lines up to at least 14 years).

I'd like large time spans to display years and months instead of just months, e.g 8 years and 1 month instead of 97 months.

neerolyte commented 7 years ago

Seems like all the code in textdecorator.js toDateText() might be better as just:

    static toDateText(dateNow, dateThen) {
        return moment(dateThen).from(moment(dateNow));
    }
Sertion commented 7 years ago

Hey David! Thank you for the issue.

If you would like to use moment.fromNow you can use the ${time.from} token in your settings.

neerolyte commented 7 years ago

Doh, failed to read the manual adequately.

Thanks @Sertion I'll close this off as it's trivially solvable with config.

Sertion commented 7 years ago

No problem. Happens to the best of us!