Returns a QuerySet of Publications that were being read on `date`.
    `date` is a date tobject.
428333
def day_publications(date):
    
    readings = Reading.objects \
                        .filter(start_date__lte=date) \
                        .filter(
                            Q(end_date__gte=date)
                            |
                            Q(end_date__isnull=True)
                        )
    if readings:
        return Publication.objects.filter(reading__in=readings) \
                        .select_related('series') \
                        .prefetch_related('roles__creator') \
                        .distinct()
    else:
        return Publication.objects.none()
80416
def get_date_field(datetimes, field):
    """"""
    return np.array([getattr(date, field) for date in datetimes])
457652
def is_date(thing):
    
    # known date types
    date_types = (datetime.datetime,
                  datetime.date,
                  DateTime)
    return isinstance(thing, date_types)
737650
function getEra(date, daily) {
  date = this.toDate(date);
  return date ? getEraFn(date, daily) : null;
}
1163335
def get_dates_file(path):
    
    with open(path) as f:
        dates = f.readlines()
    return [(convert_time_string(date_string.split(" ")[0]), float(date_string.split(" ")[1]))
            for date_string in dates]
207845
def pub_dates(soup):
    
    pub_dates = []
    tags = raw_parser.pub_date(soup)
    for tag in tags:
        pub_date = OrderedDict()
        copy_attribute(tag.attrs, 'publication-format', pub_date)
        copy_attribute(tag.attrs, 'date-type', pub_date)
        copy_attribute(tag.attrs, 'pub-type', pub_date)
        for tag_attr in ["date-type", "pub-type"]:
            if tag_attr in tag.attrs:
                (day, month, year) = ymd(tag)
                pub_date['day'] = day
                pub_date['month'] = month
                pub_date['year'] = year
                pub_date['date'] = date_struct_nn(year, month, day)
        pub_dates.append(pub_date)
    return pub_dates
675963
def get_queryset(self):
        
        kwargs = {}
        if self.start_at:
            kwargs.update({'%s__gte' % self.date_field: self.start_at})
        return super(DateRangeMixin, self).get_queryset().filter(**kwargs)
611659
def get_period(date_from: date, date_to: date) -> str:
    
    assert isinstance(date_from, date)
    assert isinstance(date_to, date)

    str_from: str = date_from.isoformat()
    str_to: str = date_to.isoformat()

    return str_from + " - " + str_to
886006
def getDateReceived(self):
        
        request = self.getRequest()
        if request:
            ar_date = request.getDateReceived()
            if ar_date and self.created() > ar_date:
                return self.created()
            return ar_date
        return None
686756
def getDateFields(fc):
    
    if arcpyFound == False:
        raise Exception("ArcPy is required to use this function")
    return [field.name for field in arcpy.ListFields(fc, field_type="Date")]
373555
def publish_date(self, publish_date):
        
        if not self.can_update():
            self._tcex.handle_error(910, [self.type])

        publish_date = self._utils.format_datetime(publish_date, date_format='%Y-%m-%dT%H:%M:%SZ')

        self._data['publishDate'] = publish_date
        request = {'publishDate': publish_date}
        return self.tc_requests.update(self.api_type, self.api_sub_type, self.unique_id, request)
313251
def get_date_of_author(_id):
    """"""
    _dict = get_date_author()
    for date, ids in _dict.items():
        if _id in ids:
            return date
    return None
575807
def readDate(self):
        
        ref = self.readInteger(False)

        if ref & REFERENCE_BIT == 0:
            return self.context.getObject(ref >> 1)

        ms = self.stream.read_double()
        result = util.get_datetime(ms / 1000.0)

        if self.timezone_offset is not None:
            result += self.timezone_offset

        self.context.addObject(result)

        return result
728042
public int getIndexByDate(Date date)
   {
      int result = -1;
      int index = 0;

      for (CostRateTableEntry entry : this)
      {
         if (DateHelper.compare(date, entry.getEndDate()) < 0)
         {
            result = index;
            break;
         }
         ++index;
      }

      return result;
   }
1233383
def on_site(self):
        
        return super(EntryPublishedManager, self).get_queryset().filter(
            sites=Site.objects.get_current())
1251381
def published(self, **kwargs):
		'''  
		'''
		return self.filter(
			Q(activate_date__lte=timezone.now()) | Q(
				activate_date__isnull=True),
			Q(deactivate_date__gte=timezone.now()) | Q(
				deactivate_date__isnull=True),
			Q(status=1), **kwargs)
752583
def get_last_date(self, field, filters_=[]):
        '''
            
        '''

        last_date = self.get_last_item_field(field, filters_=filters_)

        return last_date