import java.io.*;
import java.util.*;
/***********************************************
 * identifys wether the date today is the  same as the input
 * 
 *
 * @author - Eric Hartway
 * @version - V2 - 1/22/07
 ************************************************/



public class IO_hartwaer_Remember
{
/********************************************
* takes in file input and uses it to 
* run the program
*  
* 
*
* @param arg file input
*********************************************/
    private static Scanner dateScanner;
    private static PrintWriter screen;
    


    public static void main(String[] args)
    {
       GregorianCalendar        today;
       String                   name;  		 
		 File dates;  
		 
		 dates = new File(args[0]);
		 
				       
       today    = new GregorianCalendar();  //object to set the date
       screen   = new PrintWriter(System.out);
		 
		for (int ii = 0; ii < args.length; ii++)
		{
			dates    = new File(args[ii]);		
			 
			 
	       screen.printf(Locale.US, "\nToday's Date: %1$te %1$tB %1$tY\n", today);
	       screen.flush();       
	       
			 try 
			 {
	       	dateScanner = new Scanner(dates);
	       }
			 catch (FileNotFoundException fnfe)
			 {
			 	System.out.println("this file was not found");
		    }
			 	
	       processDates(today);
		}
    }
    


    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();
          }
       }
    }
    

}
