Gets the typed time.
TypedTime typedTime = new TypedTime();
String offset = null;
if (tokenValue.startsWith("-"))
offset = tokenValue.replace('-", ' ");
else if (tokenValue.startsWith("+"))
offset = tokenValue.replace('+", ' ");
else offset = tokenValue;
if (offset.endsWith("d")) {
typedTime.setUnit("d");
String t = offset.replace('d", ' ");
typedTime.setTime(Integer.parseInt(t.trim()));
} else
if (offset.endsWith("h")) {
typedTime.setUnit("h");
String t = offset.replace('h", ' ");
typedTime.setTime(Integer.parseInt(t.trim()));
} else
if (offset.endsWith("m")) {
typedTime.setUnit("m");
String t = offset.replace('m", ' ");
typedTime.setTime(Integer.parseInt(t.trim()));
} else {
typedTime.setUnit("s");
if (offset.endsWith("s")) {
String t = offset.replace('s", ' ");
typedTime.setTime(Integer.parseInt(t.trim()));
} else
typedTime.setTime(Integer.parseInt(offset.trim()));
}
return typedTime;