vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On 28 Jun 2005 at 11:36, Tom Cosgrove wrote: > >>> Ted Unangst 28-Jun-05 04:12 >>> > > > > drop in parsemonth from freebsd. > > use it to parse month, so "cal june 2005" works as expected. if only > > one arg is given, see if it could be a month (without interfering if > > it's a year). > > > > there's plenty more cleanup to do, but this at least makes it a bit > > more convenient to use. > > Ted > > I've been running with the diff below for nearly a year. Gives an > extra parameter -m (to start on Mondays, which is what I prefer - > since the "weekend" should be at the end of the week!): Tom, That depends on what you define as a "weekend". > > June 2005 > Mo Tu We Th Fr Sa Su > 1 2 3 4 5 > 6 7 8 9 10 11 12 > 13 14 15 16 17 18 19 > 20 21 22 23 24 25 26 > 27 28 29 30 > > allows 'cal [-m] july' > > July 2005 > Mo Tu We Th Fr Sa Su > 1 2 3 > 4 5 6 7 8 9 10 > 11 12 13 14 15 16 17 > 18 19 20 21 22 23 24 > 25 26 27 28 29 30 31 > > and 'cal [-m] aug 2005' > > August 2005 > Mo Tu We Th Fr Sa Su > 1 2 3 4 5 6 7 > 8 9 10 11 12 13 14 > 15 16 17 18 19 20 21 > 22 23 24 25 26 27 28 > 29 30 31 > > > I haven't put it forward because of Marc's i18n work, thinking we > might want to internationalise it, but if we're going to be able to > say "cal july 2005", we might as well be able to say "cal july", and I > really want -m If you really want to internationalize this, be advised that in some countries the weekend is Friday and Saturday; in some other countries the weekend is Thursday and Friday. Your patch is fine for Western countries, but needs work to be truly internationalized. > > Thanks > > Tom |