- Birthdays Perl Script -

  

 

 

 

 

Usage Notes for bday.pl

 

Bday.pl – Usage Notes - By Todd Garfield

Bday.pl was very quickly adapted from the HMD.PL script created by Nathan Gregory.  
While the original HMD.PL script was designed to report the number of days before a
Specified holiday occurring on a variable date in the future, Bday.pl is primarily 
designed to be run after-hours to prepare a daily notification of annual fixed Holidays 
or events occurring on the day it is run. 

To effectively utilize Bday.pl a two-year event file must be created (events.txt).  
In no case should multiple line entries be created within a single year’s section 
in the events,txt file for a single date.  For example, If you have multiple friends
with a birthday on 2/28, both birthdays should be entered together on the same
line (Joe and Sam’s Birthday – 2/28).   By placing all events for a specific
date on the same line, we are able to query all events for the  entire year using 
a single macro (see chkbday.bat).  In a case where an event’s date matches the current 
date, a HAL flag will be set ‘True’ indicating the current day is a holiday.   
In such a case, the file, bday.txt will contain formatted text for HAL to read 
describing the nature of the holiday.  Both year’s event sections in the events.txt 
file should be identical to avoid program failure.   When performing queries on named 
events, the dates should be entered in the schedule file and queries as mm/dd.   
The addition of the yyyy or yy date parameter will result in program failure.

The bday.pl script may  be used to determine the number of days until a single event 
file entry (see testxmas.bat).  In such a case the file, HMD.TXT will be populated 
with the number of days until the requested event.   Like the HMD.PL script, Bday.pl 
will calculate the days until the event next year, in a case where the event has already 
transpired within the current year.

Date queries may be also performed on valid future dates.  In such cases, (where a named 
event is not being used) a year parameter may be included in the query.  
For example, ‘perl bday.pl 12/25/2005’  would correctly return the number of days from the 
current day until 12/25/2005. 

Bday.pl has not been extensively tested beyond its most basic functionality.   
It serves as an example of how to quickly modify a Perl script to perform a task 
somewhat different from that which was originally intended.   
This is an unsupported application and distributed completely as is.  

 

 

 

 

 

 

 

 

 

Navigation

 

Birthday Reminders Script

Click to download Script

Perl Application Library

Main Menu