// EventTime.h -- Declares a class to represent the time that an event
//                occurred.
// t a y l o r@msoe.edu, Tue Jun 25 15:20:11  2002
// Modified: t a y l o r@msoe.edu, Sat Aug 31 09:06:20  2002 clarified operator<
// Modified: t a y l o r@msoe.edu, Tue Sep 10 10:37:33  2002 fixed namespace problems
// Modified: t a y l o r@msoe.edu, Fri Sep 13 13:47:59  2002 fixed examples URL
// Modified: t a y l o r@msoe.edu, Mon Nov 18 13:43:12  2002 adjusted default constructor
//                                                           added == != operators
// Modified: t a y l o r@msoe.edu, Mon Dec  2 05:19:11  2002 fixed operator==
//                                                           removed wkdy from ctor
// Modified: t a y l o r@msoe.edu, Tue Dec 17 08:29:36  2002 made second >> arg const

#ifndef EVENTTIME_H
#define EVENTTIME_H

#include <string>
#include <iostream>

class EventTime {
public:
  // Constructor (default: Mon, Nov 18 13:42:18  2002 -0500)
  //   where -0500 is the time offset from Coordinated Universal Time (UTC) (5 hours early)
  //   Note: The mnt string will contain the first three characters of the
  //         month it represents.
  //         The off string may range from -2300 to +2300 and has a minimum
  //          step size of 0030. (for half hour)
  EventTime(const std::string mth="Nov", const unsigned int dy=18,
            const unsigned int yr=2002, const unsigned int hr=13,
            const unsigned int min=42, const unsigned int sec=18,
            const std::string off="-0500");
  // Copy constructor
  EventTime(const EventTime& org);
  // Destructor
  ~EventTime();
  // Assignment operator
  EventTime& operator=(const EventTime& rhs);
  // Extracts event time from an input stream, returns true if successful
  const bool extract(std::istream& is);
  // Inserts event time into an output stream
  void insert(std::ostream& os) const;
  // The comparison operators listed below should account for the time zone
  //  offset.

  // Less than operator, returns true if rhs is more recent than the calling
  //  object, i.e., (yesterday < today) is true.
  const bool operator<(const EventTime& rhs) const;
  // Equality operator, returns true if rhs has the same value as the calling
  //  object
  const bool operator==(const EventTime& rhs) const;
  // Inequality operator, returns false if rhs has the same value as the
  //  calling object
  const bool operator!=(const EventTime& rhs) const;
private:
  // You need to decide what data members are appropriate.  I would suggest
  // making use of at least one static data member to help with the month
  // field.  You may find it useful to take a look at the example Date
  // class at: http://www.msoe.edu/~taylor/examples/
  // You may not change the public interface of this class.  Therefore, if
  // you decide to declare additional member functions, they must be declare
  // private or protected.

};

// Extraction operator
std::istream& operator>>(std::istream& is, EventTime& rhs);
// Insertion operator
// The event time should be placed into the output stream using the following
//   format:  Day, Date Month Year HH:MM:SS Offset
// Examples: Tue, 31 Jul 2001 15:41:10 -0700
//           Tue, 25 Jun 2002 15:16:14 -0500
std::ostream& operator<<(std::ostream& os, const EventTime& rhs);

#endif
