public tempAlg(Calendar sDate)
  {
    database.openBusDatabase();
    startDate = sDate;
    endDate = (Calendar)startDate.clone();
    endDate.add(Calendar.DATE, 6);
    routeIDs = BusStopInfo.getRoutes();//get all routes
    driverIDs = DriverInfo.getDrivers();//get all drivers
    busIDs = BusInfo.getBuses();//get all buses
    
    Date thisday;//convert cal to date obj
    Calendar tempCal = (Calendar)startDate.clone();
   // for(int i = 0; i < 7; i++)//for each day
   // {
      thisday = tempCal.getTime();//convert cal to date obj
      for(int j = 0; j < routeIDs.length; j++)
      {
        numberofservices += TimetableInfo.getNumberOfServices(routeIDs[j], 
					TimetableInfo.timetableKind(thisday));
      }
      dailyservices = new service[numberofservices];
      for(int j = 0; j < routeIDs.length; j++)//for each route
      {
	serviceIDs = TimetableInfo.getServices(routeIDs[j],
					 TimetableInfo.timetableKind(thisday));
	todayservicetimes = TimetableInfo.getTimingPoints(routeIDs[j]);
	int num = TimetableInfo.getNumberOfServices(routeIDs[j],
					TimetableInfo.timetableKind(thisday));
	numberofservices += serviceIDs.length;
	for(int k = 0; k < num; k++)//for each service
	{
	  todayservicetimes = TimetableInfo.getServiceTimes(routeIDs[j],
	 				 TimetableInfo.timetableKind(thisday),k);
	  service thisservice = new service(serviceIDs[k], todayservicetimes[0], 
	  				todayservicetimes[todayservicetimes.length
					- 1]);
	  dailyservices[servicearrayindex] = thisservice;
	  servicearrayindex++;
	}
      }
      tempCal.add(Calendar.DATE, 1);
      numberofservices = 0;
      toString(dailyservices);
    //}
  }