API data for `Webhoneypot: Web Server Log Project
    <https://dshield.org/webhoneypot/>`_.

    :param date: string or datetime.date() (required)
353838
def webhoneypotsummary(date, return_format=None):
    
    uri = 'webhoneypotsummary'
    try:
        uri = '/'.join([uri, date.strftime("%Y-%m-%d")])
    except AttributeError:
        uri = '/'.join([uri, date])
    return _get(uri, return_format)
943282
def strptime(cls, date_string, format):
        ''
        import _strptime
        return _strptime._strptime_datetime(cls, date_string, format)
305058
public String stringValue(Date date) {
		String value = null;
		if (date != null) {
			SimpleDateFormat sdf = formatters.get(0);
			synchronized (sdf) {
				value = sdf.format(date);
			}
		}
		return value;
	}
946616
public static Timestamp of(Date date) {
    return ofTimeMicroseconds(TimeUnit.MILLISECONDS.toMicros(date.getTime()));
  }
949744
def by_date(date)

      date = Time.parse(date.to_s).strftime('%Y-%m-%d')

      @context.storage.get_many('history', /!#{date}!/)
    end
1353086
def date_json(self):
        
        if self.date:
            return json.dumps(self.date.isoformat(), ensure_ascii=False)
455554
def _parse_date(cls, date_str: str) -> Optional[datetime.datetime]:
        """"""
        if not date_str:
            return None

        found_time = False
        found_day = False
        found_month = False
        found_year = False

        hour = minute = second = 0
        day = 0
        month = 0
        year = 0

        for token_match in cls.DATE_TOKENS_RE.finditer(date_str):

            token = token_match.group("token")

            if not found_time:
                time_match = cls.DATE_HMS_TIME_RE.match(token)
                if time_match:
                    found_time = True
                    hour, minute, second = [
                        int(s) for s in time_match.groups()]
                    continue

            if not found_day:
                day_match = cls.DATE_DAY_OF_MONTH_RE.match(token)
                if day_match:
                    found_day = True
                    day = int(day_match.group())
                    continue

            if not found_month:
                month_match = cls.DATE_MONTH_RE.match(token)
                if month_match:
                    found_month = True
                    month = month_match.lastindex
                    continue

            if not found_year:
                year_match = cls.DATE_YEAR_RE.match(token)
                if year_match:
                    found_year = True
                    year = int(year_match.group())

        if 70 <= year <= 99:
            year += 1900
        elif 0 <= year <= 69:
            year += 2000

        if False in (found_day, found_month, found_year, found_time):
            return None

        if not 1 <= day <= 31:
            return None

        if year < 1601 or hour > 23 or minute > 59 or second > 59:
            return None

        return datetime.datetime(year, month, day,
                                 hour, minute, second,
                                 tzinfo=datetime.timezone.utc)
216978
def http_date(value):
    
    if isinstance(value, datetime.datetime):
        value = value.utctimetuple()
    elif isinstance(value, (int, float)):
        value = time.gmtime(value)
    if not isinstance(value, str):
        value = time.strftime("%a, %d %b %Y %H:%M:%S GMT", value)
    return value
91732
public static String dateStringFromLocalDate(LocalDate date) {
        try {
            return date.toString(DATE_PATTERN);
        } catch (Exception e) {
            return null;
        }
    }
555898
def datetime(self):
        
        date_string = '%s %s %s' % (self._day,
                                    self._date,
                                    self._year)
        return datetime.strptime(date_string, '%a %B %d %Y')
640905
public static String convertDateToTimeString(Date date) {
		if (date == null) {
			return null;
		} else {
			// DateFormat df = new SimpleDateFormat("HH:mm:ss.SSS'Z'");
			DateTimeFormatter df = FORMATTER_SECONDS_Z;
			return df.print(date.getTime());
		}
	}
700394
def str_to_date(date: str) -> datetime.datetime:
    
    date = date.split('.')
    date.reverse()
    y, m, d = date
    return datetime.datetime(int(y), int(m), int(d))
1340455
def string_to_date(value):
    
    if isinstance(value, datetime.date):
        return value

    return dateutil.parser.parse(value).date()
1143455
public String query(String deviceInfo, String date, BillType type){
        checkNotNullAndEmpty(date, "date");
        checkNotNull(type, "bill type can't be null");
        Map<String, String> downloadParams = buildDownloadParams(deviceInfo, date, type);
        String billData = Http.post(DOWNLOAD).body(Maps.toXml(downloadParams)).request();
        if (billData.startsWith("<xml>")){
            XmlReaders readers = XmlReaders.create(billData);
            throw new WepayException(
                    readers.getNodeStr(WepayField.RETURN_CODE),
                    readers.getNodeStr(WepayField.RETURN_MSG));
        }
        return billData;
    }
415998
def date(name=None):
    

    if name is None:
        name = 'Date Field'

    # Basic field
    # This regex allows values from 00000101 to 99991231
    field = pp.Regex('[0-9][0-9][0-9][0-9](0[1-9]|1[0-2])'
                     '(0[1-9]|[1-2][0-9]|3[0-1])')

    # Parse action
    field.setParseAction(lambda d: datetime.datetime.strptime(d[0], '%Y%m%d')
                         .date())

    # Name
    field.setName(name)

    # White spaces are not removed
    field.leaveWhitespace()

    return field
132821
def strptime(cls, data, format, scale=DEFAULT_SCALE):  # pragma: no cover
        
        return cls(datetime.strptime(data, format), scale=scale)
133995
public String createDateString(Date date) {
        if (date == null) {
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "Null Date object provided; returning null");
            }
            return null;
        }
        if (tc.isDebugEnabled()) {
            Tr.debug(tc, "Creating date string based on date: " + date);
        }
        String formatted = simpleDateFormat.format(date);
        return formatted;
    }