[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Free Dog meeting announcement -- Thurs Nov 3rd in Cambridge, MA, USA.



#!/usr/bin/perl

use strict;
use warnings;
use Carp;

use Date::Calc qw(Time_to_Date Nth_Weekday_of_Month_Year Add_Delta_YM
Month_to_Text);

my $dow = 4; # Thursday
my $n   = 1; # first one
my $year;
my $month;
my $day;

($year, $month, $day) = Time_to_Date(time);
($year, $month)       = Add_Delta_YM($year, $month, $day, 0,1); # add a month
($year, $month, $day) = Nth_Weekday_of_Month_Year($year, $month, $dow,
$n); # first Thursday
printf("Next Freedog Meeting is on %i-%s-%i",
       $day, Month_to_Text($month), $year);

(* jcl *)

On 10/31/05, Stuart Brorson <sdb@xxxxxxxxxx> wrote:
> Arrrgh!   I left the wrong date at the bottom.  Here's the correct
> info:
>
> > --------------   Free Dog Meeting Announcement ----------------
>
> [ . . . snip . . . .]
>
> > Date: Thursday, November 3rd, 2005.  (*** The usual time and day ***)
> > Time: 7:00pm
> > Location: Starbucks Coffee, 6 Cambridge Center, Cambridge,
> > MA, USA.                            (*** The usual location ***)
>
> Maybe I need to create these announcements with a Perl script which
> calls the "date" function instead of doing a manual cut-'n-paste.
> Right John?   :-)
>
> Stuart
>


--
http://www.luciani.org