code: public static TimeSpan toTimespan(Object o, TimeSpan defaultValue) {
  	if (o instanceof TimeSpan) return (TimeSpan) o;
  	else if (o instanceof String) {
  	    String[] arr = o.toString().split(",");
  	    if (arr.length == 4) {
  		int[] values = new int[4];
  		try {
  		    for (int i = 0; i < arr.length; i++) {
  			values[i] = toIntValue(arr[i]);
  		    }
  		    return new TimeSpanImpl(values[0], values[1], values[2], values[3]);
  		}
  		catch (ExpressionException e) {}
  	    }
  	}
  	else if (o instanceof ObjectWrap) {
  	    Object embeded = ((ObjectWrap) o).getEmbededObject(DEFAULT);
  	    if (embeded == DEFAULT) return defaultValue;
  	    return toTimespan(embeded, defaultValue);
  	}
  
  	double dbl = toDoubleValue(o, true, Double.NaN);
  	if (!Double.isNaN(dbl)) return TimeSpanImpl.fromDays(dbl);
  
  	return defaultValue;
      }
docs: cast a Object to a TimeSpan Object (alias for toTimeSpan)
  
  @param o Object to cast
  @param defaultValue
  @return casted TimeSpan Object