code: public static DateTime resolve(String expr)
  	{
  		for (WebQueryDateAnchor anchor : WebQueryDateAnchor.values())
  		{
  			if (StringUtils.startsWithIgnoreCase(expr, anchor.name()))
  			{
  				final DateTime baseDate = anchor.resolve();
  
  				if (expr.equalsIgnoreCase(anchor.name()))
  				{
  					return baseDate;
  				}
  				else
  				{
  					// Consider + and -
  					final String maths = expr.substring(anchor.name().length());
  
  					final boolean plus;
  					if (maths.charAt(0) == '+' || maths.charAt(0) == ' ')
  					{
  						plus = true;
  					}
  					else if (maths.charAt(0) == '-')
  						plus = false;
  					else
  					{
  						throw new IllegalArgumentException("Expected [+- ] but got char " +
  						                                   maths.charAt(0) +
  						                                   " while processing " +
  						                                   expr);
  					}
  
  					final String period = maths.substring(1);
  
  					final Period timePeriod = Period.parse(period);
  
  					if (plus)
  						return baseDate.plus(timePeriod);
  					else
  						return baseDate.minus(timePeriod);
  				}
  			}
  		}
  
  		// Not a special string
  		return ISO_FORMAT.parseDateTime(expr);
  	}
docs: Resolve a datetime expression (or a literal ISO datetime)
  
  @param expr
  
  @return