*
* @param str
* @return period derived from str
*/
public static Period parse(String str) {
TimeUnit units = null;
int index = -1;
if ((index = str.indexOf('d')) > 0
|| (index = str.indexOf('D')) > 0) {
units = TimeUnit.DAYS;
enforceUnit(index,str,units);