import java.io.*;
import java.util.*;
/********************************************************************
*
*
*	@author Joseph Claus
*	@version V1
*/
// Date: 1/22/07
// Section: 1
// Lab: Session 4

public class IO_clausjs_Remember
{
    private static Scanner        dateScanner;
    private static PrintWriter    screen;
    
	 /***************************************
	 * This is the main method where the 
	 *	program execution takes place
	 */

    public static void main(String[] args) throws IOException
    {
       GregorianCalendar        today;
       String                   name;
		 File[]						  dates; //Creates the array for the dates

   	 dates	 = new File[args.length]; //Initiates 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();       

   	 for (int index = 0; index < dates.length; index++)// The for loop to run the arguments
		 {
		 		dates[index] = new File(args[index]);	
				dateScanner = new Scanner(dates[index]);
		 }

       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();
          }
       }
    }
    

}
