#include "hhmmss.h"

/*********************************************
 ** FUNCTION DEFINITIONS
 *********************************************/

hhmmss readtime(istream* pIN)
{ 
  hhmmss t;
  char c;
  (*pIN) >> c >> t.h >> c >> t.m >> c >> t.s >> c;
  return t;
}

bool before(hhmmss a, hhmmss b)
{
  if (a.h != b.h)
    return a.h < b.h; // hours decide
  else if (a.m != b.m)
    return a.m < b.m; // minutes decide
  else 
    return a.s < b.s;   // down to seconds!
}