Re: [0000/0010] cal: code revisit part I

Karel Zak
2013-10-31T12:15:07Z

On Sun, Oct 27, 2013 at 08:42:26PM +0000, Sami Kerola wrote:
> I got the --one and --three outputs working, but I am not completely
> happy about the --three. Quite frankly better function would take input
> how many horizontal calendar outputs are needed, and would do exactly
> that. Such function would be more reusable when considering yearly
> output, and the fact it has two column output when in julian mode.

Yes, in the final output function should not be hardcoded a number of
months -- it would be better to have a generic function that
is able to use arbitrary list/array of the months. The list/array of
the months should be composed in another function.

Now it's possible to print only 1, 3 or 12 months, and all is
hardcoded. It would be nice to have a way how to print arbitrary
number of months (or arbitrary range).

For example it would be nice to have a way how to specify a quarter
of the company fiscal year (!= calendar year). I can imagine
something like --month= option or so..

> Karel, it is be best not to merge the last patch. It is more of
> work-in-progress, comments would be great.

I'll probably wait for whole code refactoring rather than merge
an incomplete thing.

Karel

--
Karel Zak <kzak@redhat.com>