Evaluates the XPath as a Date value. This method is just a shortcut for as(Date.class); You
probably want to specify ' using ' followed by some formatting pattern consecutive to the
XPAth.

@return Date value of evaluation result.
172442
@Override
    public Date asDate() {
        final Class<?> callerClass = ReflectionHelper.getDirectCallerClass();
        return evaluateSingeValue(Date.class, callerClass);
    }
1304856
public Date getEndDate() {
        DateRange range = getSelectedRange();
        return range == null ? null : range.getEndDate();
    }
49640
public Date getDate() {
		try {
            date = dateFormatter.parse(getText());
		} catch (ParseException e) {
			date = null;
		}
		return date;
	}
1288542
public String getDate() {
        SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
        String date = formatter.format(calendar.getTime());

        return date;
    }
690803
public com.google.api.ads.admanager.axis.v201805.Date getDate() {
        return date;
    }
809339
@Override
    public Object format(Object value) {
        if (value == null) {
            return nullStringValue;
        }
        if(value.getClass().isArray()) {
            return asList(value);
        } else if (value instanceof Date) {
           Date date = (Date) value;
           if (date.getTime() % ONE_DAY_IN_MILLIS == 0) {
               return new SimpleDateFormat(datePattern).format(date);
           } else {
               return new SimpleDateFormat(dateTimePattern).format(date);
           }
        } else if(value instanceof CompositeData) {
            return toMap((CompositeData)value);
        } else if(value instanceof Element) {
            return parseXmlElement((Element) value);
        }
        
        return value;
    }
694878
function () {
    let date = new Date();
    let result = {};
    let regex = /(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d).\d\d\dZ/g;
    let current = regex.exec(date.toJSON());
    if (current === null || current.length < 7) {
        return null;
    }
    for (let i = 0; i < 6; i++) {
        //The first element is the full matched string
        result[values[i]] = current[i + 1];
    }
    return result;
}
404390
protected Date getPickerDate() {
        try {
            JsDate pickerDate = getPicker().get("select").obj;
            return new Date((long) pickerDate.getTime());
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
322631
public java.util.Date getDate(String attr) {
		return (java.util.Date)attrs.get(attr);
	}
284005
def _update_dates(self, xpath_root=None, **update_props):
        

        tree_to_update = update_props['tree_to_update']
        prop = update_props['prop']
        values = (update_props['values'] or {}).get(DATE_VALUES) or u''
        xpaths = self._data_structures[prop]

        if not self.dates:
            date_xpaths = xpath_root
        elif self.dates[DATE_TYPE] != DATE_TYPE_RANGE:
            date_xpaths = xpaths.get(self.dates[DATE_TYPE], u'')
        else:
            date_xpaths = [
                xpaths[DATE_TYPE_RANGE_BEGIN],
                xpaths[DATE_TYPE_RANGE_END]
            ]

        if xpath_root:
            remove_element(tree_to_update, xpath_root)

        return update_property(tree_to_update, xpath_root, date_xpaths, prop, values)
680309
public String getEstimateDate() {
        final DateParser parser = new DateParser(getDate());
        if (estimateDate == null) {
            estimateDate = parser.getEstimateCalendar();
        }
        final SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd",
                Locale.US);
        return format(formatter, estimateDate);
    }
783652
public static <T extends Comparable<?>> DateExpression<T> asDate(T value) {
        return asDate(constant(value));
    }
852
public Date getStartDate()
   {
      Date result = (Date) getCachedValue(ProjectField.START_DATE);
      if (result == null)
      {
         result = getParentFile().getStartDate();
      }
      return (result);
   }
346710
@Override
    @Scope(DocScope.IO)
    public XPathEvaluator evalXPath(final String xpath) {
        return new DefaultXPathEvaluator(projector, new DocumentResolver() {
            @Override
            public Document resolve(final Class<?>... resourceAwareClasses) throws IOException {
                return IOHelper.getDocumentFromURL(projector.config().createDocumentBuilder(), url, requestProperties, resourceAwareClasses);
            }
        }, xpath);
    }
1125931
public static final String printExtendedAttributeDate(Date value)
   {
      return (value == null ? null : DATE_FORMAT.get().format(value));
   }
1229105
private String xPathEvaluate(Object input) {
        JAXPXPathEngine engine = xpf == null ? new JAXPXPathEngine() : new JAXPXPathEngine(xpf);
        if (prefix2Uri != null) {
            engine.setNamespaceContext(prefix2Uri);
        }

        Source s = Input.from(input).build();
        Node n = dbf != null ? Convert.toNode(s, dbf) : Convert.toNode(s);
        return engine.evaluate(xPath, n);
    }
864499
@Deprecated
	public static String getDateString(Date date) {
		synchronized(StringUtility.class) {
			calendar.setTime(date);
			int day=calendar.get(Calendar.DATE);
			return (day>=0 && day<=9 ? "0":"")+String.valueOf(calendar.get(Calendar.DATE))+MONTHS[calendar.get(Calendar.MONTH)]+calendar.get(Calendar.YEAR);
		}
	}