CGI Calendar Script

2002-07-09 Thread Roger Spears

Hello,

Well for my next project I'm trying to build an interactive calendar
system using Perl/CGI.

I've got it all worked out on paper...almost, but I can't figure out how
to get the script to actually fill in the table of boxes which represent
the days of the month.  That is to say, how can I get the script to
figure out that the 1st of July this year was a Monday?  Anyone know of
any example scripts or snippets of code I could look at for this
project?

Thanks,
Roger



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: CGI Calendar Script

2002-07-09 Thread David T-G

Roger --

...and then Roger Spears said...
% 
% Hello,

Hi!


% 
% Well for my next project I'm trying to build an interactive calendar
% system using Perl/CGI.

Neat.  I'd be quite interested in the finished product.  I've been
searching (fruitlessly) for a calendar that will print multi-day events
in a lined-up bar across the days instead of jumbling events together.
Will yours work for me?


% 
% I've got it all worked out on paper...almost, but I can't figure out how
% to get the script to actually fill in the table of boxes which represent
% the days of the month.  That is to say, how can I get the script to
% figure out that the 1st of July this year was a Monday?  Anyone know of
% any example scripts or snippets of code I could look at for this
% project?

You mean something like

  bash-2.05a$ cal 07 2002 | head -3
   July 2002
  Su Mo Tu We Th Fr Sa
  1  2  3  4  5  6
  bash-2.05a$ \
  > perl -e 'use Date::Manip;print Date_DayOfWeek("7","1","2002") . "\n";'
  1
  bash-2.05a$ cal 08 1968 | head -3
  August 1968
  Su Mo Tu We Th Fr Sa
   1  2  3
  bash-2.05a$ \
  > perl -e 'use Date::Manip;print Date_DayOfWeek("8","1","1968") . "\n";'
  4

or so? :-)  If you know the epoch time of a given date then localtime
will give you the day of the week, too, but I couldn't think of a way to
get the right expr to feed localtime in thirty seconds so I fell back on
an additional module (which is quite handy, BTW).


% 
% Thanks,
% Roger

HTH & HAND


:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg05807/pgp0.pgp
Description: PGP signature


Re: CGI Calendar Script

2002-07-09 Thread Gunther Birznieks

At 08:55 AM 7/10/2002, David T-G wrote:
>Roger --
>
>...and then Roger Spears said...
>%
>% Hello,
>
>Hi!
>
>
>%
>% Well for my next project I'm trying to build an interactive calendar
>% system using Perl/CGI.
>
>Neat.  I'd be quite interested in the finished product.  I've been
>searching (fruitlessly) for a calendar that will print multi-day events
>in a lined-up bar across the days instead of jumbling events together.
>Will yours work for me?

Our calendar does something like this within our day view. We call it a 
"chunking algorithm" to allow events to span different hours and overlap 
with other events within the same day while looking nice.

Our month and week views do not do this same chunking (the events are just 
repeated) but the general chunking algorithm could probably be reused in 
our month and week views if this was something you were keen on.

It's part of the downloads on http://www.extropia.com/

Later,
 Gunther



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: CGI Calendar Script

2002-07-10 Thread Marcel Fortin

I remember installing Matt Kruse's calendar script. It'd be a
good example. You can find it at http://www.CalendarScript.com/ 

Marcel Fortin


Roger Spears wrote:
> 
> Hello,
> 
> Well for my next project I'm trying to build an interactive calendar
> system using Perl/CGI.
> 
> I've got it all worked out on paper...almost, but I can't figure out how
> to get the script to actually fill in the table of boxes which represent
> the days of the month.  That is to say, how can I get the script to
> figure out that the 1st of July this year was a Monday?  Anyone know of
> any example scripts or snippets of code I could look at for this
> project?
> 
> Thanks,
> Roger
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: CGI Calendar Script

2002-07-10 Thread David T-G

Gunther, et al --

...and then Gunther Birznieks said...
% 
% At 08:55 AM 7/10/2002, David T-G wrote:
% >
...
% >searching (fruitlessly) for a calendar that will print multi-day events
% >in a lined-up bar across the days instead of jumbling events together.
% >Will yours work for me?
% 
% Our calendar does something like this within our day view. We call it a 
% "chunking algorithm" to allow events to span different hours and overlap 

Good name; quite descriptive.


% with other events within the same day while looking nice.

Exactly.


% 
% Our month and week views do not do this same chunking (the events are just 

Ah.


% repeated) but the general chunking algorithm could probably be reused in 
% our month and week views if this was something you were keen on.

That's good to know.


% 
% It's part of the downloads on http://www.extropia.com/

Thanks; I'll save the bookmark!

extropia sounds very familiar; hmmm...  Ah!  Yep; I hit the Selena web
page when looking for web-based calendars back in '98 or so :-)  Perhaps
it's time I visited again.


% 
% Later,
% Gunther
% 


Thanks again & HAND

:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg05812/pgp0.pgp
Description: PGP signature