docs: function parse_isodur(s) {
  	var sec = 0, mt = 0, time = false;
  	var m = s.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);
  	if(!m) throw new Error("|" + s + "| is not an ISO8601 Duration");
  	for(var i = 1; i != m.length; ++i) {
  		if(!m[i]) continue;
  		mt = 1;
  		if(i > 3) time = true;
  		switch(m[i].substr(m[i].length-1)) {
  			case 'Y':
  				throw new Error("Unsupported ISO Duration Field: " + m[i].substr(m[i].length-1));
  			case 'D': mt *= 24;
  				/* falls through */
  			case 'H': mt *= 60;
  				/* falls through */
  			case 'M':
  				if(!time) throw new Error("Unsupported ISO Duration Field: M");
  				else mt *= 60;
  				/* falls through */
  			case 'S': break;
  		}
  		sec += mt * parseInt(m[i], 10);
  	}
  	return sec;
  }