I wanted to add -5 and -7 to cal and I did.
And it works.
But it looks bad.
Can anyone think of better implementation?
Thanks.
+ case '5':
+ nmons = 5;
+ if (--month == 0) {
+ month = 12;
+ year--;
+ }
+ if (--month == -1) {
+ month = 11;
+ year--;
+ }
+ break;
+ case '7':
+ nmons = 7;
+ if (--month == 0) {
+ month = 12;
+ year--;
+ }
+ if (--month == -1) {
+ month = 11;
+ year--;
+ }
+ if (--month == -2) {
+ month = 10;
+ year--;
+ }
+ break;
Received on Sun Jan 15 2017 - 23:55:53 CET
This archive was generated by hypermail 2.3.0
: Mon Jan 16 2017 - 00:00:31 CET