added ValidTime function to helper/output.class