args
    date - date object
    returns entry text or None if entry doesn't exist
174978
def get_entry(journal_location, date):
    
    if not isinstance(date, datetime.date):
        return None
    try:
        with open(build_journal_path(journal_location, date), "r") as entry_file:
            return entry_file.read()
    except IOError:
        return None
94390
def _parse_date(self, dt, fmt=None):
        
        try:
            # test if it's not a datelike instance ...
            _dt = utils.Date(dt, fmt=fmt)
        except ValueError:
            # nope, not a datelike instance
            _dt = None
        return _dt
804995
def QA_util_date_int2str(int_date):
    
    date = str(int_date)
    if len(date) == 8:
        return str(date[0:4] + '-' + date[4:6] + '-' + date[6:8])
    elif len(date) == 10:
        return date
136443
def date(page):
    
    soup = BeautifulSoup(page)
    try:
        page_date = soup.find('input', attrs={'name': 'date'})['value']
        parsed_date = datetime.strptime(page_date, '%Y-%m-%d')
        return parsed_date.strftime('%a, %b %d, %Y')
    except:
        return None
1356205
def inc_date(date_obj, num, date_fmt):
    
    return (date_obj + timedelta(days=num)).strftime(date_fmt)
97596
def parse_date(value: Union[date, StrIntFloat]) -> date:
    
    if isinstance(value, date):
        if isinstance(value, datetime):
            return value.date()
        else:
            return value

    number = get_numeric(value)
    if number is not None:
        return from_unix_seconds(number).date()

    match = date_re.match(cast(str, value))
    if not match:
        raise errors.DateError()

    kw = {k: int(v) for k, v in match.groupdict().items()}

    with change_exception(errors.DateError, ValueError):
        return date(**kw)
282739
def transaction_date(self, value):
        
        if value:
            self._transaction_date = parse(value).date() if isinstance(value, type_check) else value
800708
def extractDate(self, inp):
        """"""
        dates = self.extractDates(inp)
        for date in dates:
            return date
        return None
761293
function(arg) {
  var args = Array.isArray(arg) ? arg : Array.apply(null, arguments);
  lastMsgDate = new Date();
  fs.write(tempFile, JSON.stringify(args) + '\n', 'a');
}
1360575
def parse_date(self, value):
        
        if isinstance(value, sixmini.string_types):
            return self.str2date(value)
        elif value is None:
            raise TypeError("Unable to parse date from %r" % value)
        elif isinstance(value, sixmini.integer_types):
            return date.fromordinal(value)
        elif isinstance(value, datetime):
            return value.date()
        elif isinstance(value, date):
            return value
        else:
            raise ValueError("Unable to parse date from %r" % value)
661806
def GetDate(self):
    
    if self._timestamp is None:
      return None, None, None

    try:
      number_of_days, _, _, _ = self._GetTimeValues(self._timestamp)
      return self._GetDateValues(number_of_days, 1970, 1, 1)
    except ValueError:
      return None, None, None
1306694
function coerceDate(value) {
    if (value instanceof Date) {
        return value;
    }

    let timestamp = Date.parse(value);

    if (!isNaN(timestamp)) {
        return new Date(timestamp);
    }

    return value;
}
854884
def args(self) -> str:
        """"""
        value = self._value
        if not value:
            value = datetime.now()
        return value.strftime('%y%m%d%w%H%M')
553518
def _get_date(day=None, month=None, year=None):
    """"""

    now = datetime.date.today()
    if day is None:
        return now

    try:
        return datetime.date(
            day=int(day),
            month=int(month or now.month),
            year=int(year or now.year),
        )
    except ValueError as error:
        print("error: {0}".format(error), file=sys.stderr)
1374637
def pastdate(self, prompt, default=None):
        """"""
        prompt = prompt if prompt is not None else "Enter a past date"
        if default is not None:
            prompt += " [" + default.strftime('%d %m %Y') + "]"
        prompt += ': '
        return self.input(curry(filter_pastdate, default=default), prompt)
1042638
def set!(date)
      date = Date.parse date if date.is_a?(String)

      message = "DateField##{__callee__} only accepts instances of Date or Time"
      raise ArgumentError, message unless [Date, ::Time].include?(date.class)

      date_string = date.strftime('%Y-%m-%d')
      element_call(:wait_for_writable) { execute_js(:setValue, @element, date_string) }
    end
849851
function getDate (dateString) {
  var date = new Date(dateString);

  if (Object.prototype.toString.call(date) === '[object Date]' && !isNaN(date.getTime())) {
    return date;
  }

  //try to fix invalid date
  date = fixInvalidDate(dateString);

  //if date still isn't valid there's not more we can do..
  if (!isNaN(date.getTime())) {
    return date;
  }
}