   import java.io.*;
   import java.util.*;

/************************************
* Prints out the current date and prints out a celebrity who was born
* today.
* @author - Modified by Ryan Patterson
* 
* Name: Ryan Patterson
* Date: 1/22/07
* Lab: 4
* Section: 2
************************************/
    public class IO_patterrd_Remember
   {
      private static Scanner        dateScanner;
      private static PrintWriter    screen;
    
   
   	/************************************************
   	* Prints out date using GregorianCalender object.
   	*************************************************/
       public static void main(String[] args)
      {
         GregorianCalendar        today;
         String                   name;
         File							 dates;      
      
       
         today    = new GregorianCalendar();
         screen   = new PrintWriter(System.out);
			
      	
         screen.printf(Locale.US, "\nToday's Date: %1$te %1$tB %1$tY\n", today);
         screen.flush();       
      
         dateScanner = new Scanner(System.in);
      	
			for (int index = 0; index < args.length; index++)
			{
			 dates = new File(args[index]);
			 
			 dateScanner.nextLine(dates);
			 
   	    processDates(today);
			 
			}
      }
    
   
   /********************************************
   *Prints the name of celebrities born 
   *
   */
       private static void processDates(GregorianCalendar today)
      {  
         
         int           day, month;              
         String        name;
       
      
       // Use the '\t' (tab) and '/' characters as delimiters
         dateScanner.useDelimiter("[\t/]");
         
         while (dateScanner.hasNext())
         {
            month = dateScanner.nextInt();
            day   = dateScanner.nextInt();
            name  = dateScanner.nextLine();
         
            if ((month == (today.get(Calendar.MONTH)+1)) && 
              (day   == today.get(Calendar.DAY_OF_MONTH)))
            {
               screen.printf("%s\n", name);
               screen.flush();
            }
         }
      }
    
   
   }
