Re: Number of working days in given month
Rob Gom wrote: Hi there, do you know any command line tool which would be able to display number of working days in given month in given country? I have found gcal, which suits my needs, but is barely maintained (last release in 2000) and I'm afraid about its possible removal (currently maintained in Debian by QA group). Besides, its options syntax is scary and it's not present in other Linux distributions (thinking about Fedora). For now I can stick with gcal, just asking for other tools. Regards, Robert Not really a command line tool, but you might look into emacs. I know that the calendar has holidays in it and you can count days also. good luck -mike -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Number of working days in given month
On Wed, Jul 01, 2009 at 09:27:49AM +0200, Rob Gom was heard to say: > Hi there, > do you know any command line tool which would be able to display > number of working days in given month in given country? > I have found gcal, which suits my needs, but is barely maintained > (last release in 2000) and I'm afraid about its possible removal > (currently maintained in Debian by QA group). Besides, its options > syntax is scary and it's not present in other Linux distributions > (thinking about Fedora). > For now I can stick with gcal, just asking for other tools. It seems like calendar(1) should be able to do this, but I'm not sure how much manual labor it would take. Daniel -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Number of working days in given month
> > The shell is your friend. If your needs are simple, this will do: > > cal | > FIELDWIDTHS=2 awk 'NR <= 2 {next}; {print $2, $3, $4, $5, $6}' | > wc -w > > Just replace the arguments to print with the days of the week you care > about. > Thanks, that would do it, unless I'm looking for holidays exclusion :) Regards, Robert -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Number of working days in given month
On Wed, Jul 01, 2009 at 09:27:49AM +0200, Rob Gom wrote: > Hi there, do you know any command line tool which would be able to > display number of working days in given month in given country? I have The shell is your friend. If your needs are simple, this will do: cal | FIELDWIDTHS=2 awk 'NR <= 2 {next}; {print $2, $3, $4, $5, $6}' | wc -w Just replace the arguments to print with the days of the week you care about. -- "Oh, look: rocks!" -- Doctor Who, "Destiny of the Daleks" -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Fwd: Number of working days in given month
[CC to list] -- Forwarded message -- From: Rob Gom Date: Wed, Jul 1, 2009 at 12:45 PM Subject: Re: Number of working days in given month To: Ron Johnson > > I'd write a little $SCRIPTING_LANGUAGE program to count the number of > weekend days in the month, and subtract that from the number of days in the > month. > > To take holidays into account, I'd add an associative array with the year's > holidays, and use that to further reduce the number of work days. > > -- > Scooty Puff, Sr > The Doom-Bringer That's fine unless I'd like to take "moving" holidays into account. In case of my country there are at least two of them - Easter and Holy Cross. I can implement something on my own, but I'm looking for something ready. Regards, Robert -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Re: Number of working days in given month
On 2009-07-01 02:27, Rob Gom wrote: Hi there, do you know any command line tool which would be able to display number of working days in given month in given country? I have found gcal, which suits my needs, but is barely maintained (last release in 2000) and I'm afraid about its possible removal (currently maintained in Debian by QA group). Besides, its options syntax is scary and it's not present in other Linux distributions (thinking about Fedora). For now I can stick with gcal, just asking for other tools. I'd write a little $SCRIPTING_LANGUAGE program to count the number of weekend days in the month, and subtract that from the number of days in the month. To take holidays into account, I'd add an associative array with the year's holidays, and use that to further reduce the number of work days. -- Scooty Puff, Sr The Doom-Bringer -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Number of working days in given month
Hi there, do you know any command line tool which would be able to display number of working days in given month in given country? I have found gcal, which suits my needs, but is barely maintained (last release in 2000) and I'm afraid about its possible removal (currently maintained in Debian by QA group). Besides, its options syntax is scary and it's not present in other Linux distributions (thinking about Fedora). For now I can stick with gcal, just asking for other tools. Regards, Robert -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org