   import java.io.*;
   import java.util.*;

/****** PUT YOUR HEADER INFORMATION HERE
 */
    public class Remember
   {
      private static Scanner        dateScanner;
      private static PrintStream    screen;
   
       public static void main(String[] args)
      {
         GregorianCalendar today;
         String            name;       
         File 				 dates;			
      
         today    = new GregorianCalendar();
         screen   = new PrintStream(System.out);
         screen.printf(Locale.US, "\nToday's Date: %1$te %1$tB %1$tY\n", today);
      
         if(args.length == 0)
         {
            dates = null; // make the compiler happy
            System.out.println("No file provided.  Exiting.");
            System.exit(1);
         }
         else
         {
            for (int index = 0; index < args.length; index++)
            {
               dates = new File(args[index]);
            
               try
               {
                  dateScanner = new Scanner(dates);
						processDates(today);
               }
                   catch (FileNotFoundException fnfe)
                  {
                     System.out.printf("File, %s, not found.  Going on to the next.\n",
							 dates.getName()); 
                  }
  
            }
         }

      }
    
   
    /************************************************************************** 
     *  processDates takes the GregorianCalendar object (a date) and compares it
     *  to each of the items in the file being read in by dateScanner.  Any that match
     *  are sent to the output file
     *************************************************************************/
       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);
            }
         }
      }
    
   
   }
