k4rthik / git-cal

github like contributions calendar on terminal
MIT License
1.12k stars 61 forks source link

Modify --period for negative numbers #25

Closed nferraz closed 11 years ago

nferraz commented 11 years ago

git-cal --period=-1 should return the current month, in the same way as $array[-1] returns the last element of an array (and not the last two).

This way, --period=-2 would return 2 months, -3 would return 3 months, and so on, up to --period=-12, which would return 12 months.

k4rthik commented 11 years ago

Yes, i thought of that, but it will look very weird in the first few days of the month ( Imagine a couple of boxes on the screen ), So thought current month is a bonus with what ever period is selected, What do you think?