OT: Kentucky Derby Day

Nancy Palmquist nlp at vss3.com
Fri May 2 09:19:02 PDT 2008


Bob Stockler wrote:
> This coming Saturday is Kentucky Derby Day, and I invite all of you
> to join me and my lovely wife Nada to a virtual Kentucky Derby Day
> Party.  The Derby will be broadcast on national TV Saturday afternoon
> (see you local TV listings for time and station).  We'll all sit in
> from of our TV's, sipping our Mint Juleps (I won't bore you with my
> recipe for them this year as I've done in the past - Google for some
> if you need to, and choose the one easiest to prepare), and enjoy the
> atmosphere and race (virtually) together at the same time.

Sounds like fun, but other duties call.  But about the datecalc logic, you just 
have too much time on your hands.  But it is cool none the less.

Nancy


> 
> For you added convenience (since I may not be around next year) here
> are the dates of Kentucky Derby Day for this and the next 20 years:
> 
>   Derby Day is Saturday 05/03/2008
>   Derby Day is Saturday 05/02/2009
>   Derby Day is Saturday 05/01/2010
>   Derby Day is Saturday 05/07/2011
>   Derby Day is Saturday 05/05/2012
>   Derby Day is Saturday 05/04/2013
>   Derby Day is Saturday 05/03/2014
>   Derby Day is Saturday 05/02/2015
>   Derby Day is Saturday 05/07/2016
>   Derby Day is Saturday 05/06/2017
>   Derby Day is Saturday 05/05/2018
>   Derby Day is Saturday 05/04/2019
>   Derby Day is Saturday 05/02/2020
>   Derby Day is Saturday 05/01/2021
>   Derby Day is Saturday 05/07/2022
>   Derby Day is Saturday 05/06/2023
>   Derby Day is Saturday 05/04/2024
>   Derby Day is Saturday 05/03/2025
>   Derby Day is Saturday 05/02/2026
>   Derby Day is Saturday 05/01/2027
>   Derby Day is Saturday 05/06/2028
> 
> Bob
> 
> PS - The Kentucky Derby is always held on the first Saturday in May,
>      so this little shell script, using my "datecalc" program, let me
>      provide the above dates very quickly:
> 
>        #!/bin/ksh
>        # Dermine Derby Day for this year and the next 20 years
>        dt=1 ; yr=2008
>        while :
>        do dd=$( datecalc -d 05/0$dt/$yr )
>           [[ $dd == Saturday ]] && {
>             print "  Derby Day is Saturday 05/0$dt/$yr"
>             (( $yr == 2028 )) && exit
>             dt=1 ; yr=$(( $yr + 1 )) ; continue
>           } || {
>             dt=$(( $dt + 1 ))
>           }
>        done
> 
> PPS - My "datecalc" program was originall written in AWK, and handles
>       dates from 01/01/0001 to 12/31/9999.  I translated it to Perl
>       and will email either or both to anyone requesting via email.
> 
>   Use datecalc to return the:
> 
>     Date n days before (-n) or after (+n) today:
> 
> 	datecalc [-d] -n | [+]n
> 
>     Number of days from today ( + or - ) to some other date:
> 
> 	datecalc [-d] [m]m/[d]d/[yy]yy
> 
>     Date n days before (-n) or after (+n) a given date:
> 
> 	datecalc -n|[+]n [m]m/[d]d/[yy]yy | [m]m/[d]d/[yy]yy -n|[+]n
> 
>     Number of days by which date1 precedes or follows (-) date2:
> 
> 	datecalc [m]m/[d]d/[yy]yy [m]m/[d]d/[yy]yy
> 
>     -d --- Returns the day of the week of the target date.
> 
>     2-digit year input dates default to 20yy.
> 


-- 
Nancy Palmquist 		MOS & filePro Training Available
Virtual Software Systems	Web Based Training and Consulting	
PHONE: (412) 835-9417		   Web site:  http://www.vss3.com


More information about the Filepro-list mailing list