The date of birth of the individual.
        :param value:
        :return:
14446
def date_of_birth(self, value):
        
        if value:
            self._date_of_birth = parse(value).date() if isinstance(value, type_check) else value
1210875
def pprint_value(self, value):
        
        own_type = type(value) if self.type is None else self.type
        formatter = (self.value_format if self.value_format
                     else self.type_formatters.get(own_type))
        if formatter:
            if callable(formatter):
                return formatter(value)
            elif isinstance(formatter, basestring):
                if isinstance(value, (dt.datetime, dt.date)):
                    return value.strftime(formatter)
                elif isinstance(value, np.datetime64):
                    return util.dt64_to_dt(value).strftime(formatter)
                elif re.findall(r"\{(\w+)\}", formatter):
                    return formatter.format(value)
                else:
                    return formatter % value
        return unicode(bytes_to_unicode(value))
290054
def date_created(self):
        """"""
        date_created = self.xml.find('author-profile/date-created', ns)
        try:
            return (int(date_created.attrib['year']),
                    int(date_created.attrib['month']),
                    int(date_created.attrib['day']))
        except AttributeError:  # date_created is None
            return (None, None, None)
795573
def display_user(value, arg):
    ''' 
    '''
    if value.user == arg and arg.username != ANONYMOUS_USERNAME:
        return "You"
    else:
        return value.user.get_full_name()
901160
def value(self, value, *args, **kwargs):
        
        from datetime import datetime
        value = self.obj.value(value, *args, **kwargs)
        try:
            rv = datetime.strptime(value, self.format)
        except ValueError as _:  # noqa
            rv = None
        return rv
722610
def similar_date(anon, obj, field, val):
    
    return anon.faker.date(field=field, val=val)
212221
def age(self, as_at_date=None):
        
        if self.date_of_death != None or self.is_deceased == True:
            return None

        as_at_date = date.today() if as_at_date == None else as_at_date
        
        if self.date_of_birth != None:
            if (as_at_date.month >= self.date_of_birth.month) and (as_at_date.day >= self.date_of_birth.day):
                return (as_at_date.year - self.date_of_birth.year)
            else:
                return ((as_at_date.year - self.date_of_birth.year) -1)
        else:
            return None
985274
def default(self, value):
        
        if isinstance(value, uuid.UUID):
            return str(value)
        elif isinstance(value, datetime.datetime):
            return value.isoformat()
        elif callable(value):
            return str(value)
        return json.JSONEncoder.default(self, value)
789765
def _initial_individual(self):
        """"""
        ind = creator.Individual(
            [random.uniform(-1, 1)
             for _ in range(len(self.value_means))])
        return ind
1367269
public static function birthDateComparator(): Closure
    {
        return static function (Individual $x, Individual $y): int {
            return Date::compare($x->getEstimatedBirthDate(), $y->getEstimatedBirthDate());
        };
    }
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)
913953
def birth_and_death_date2marc(self, key, value):
    
    name_field = self.get('100', {})

    if 'd' in name_field:
        if int(name_field['d'].split('-')[0]) > int(value.split('-')[0]):
            dates_field = ' - '.join([value, name_field['d']])
        else:
            dates_field = ' - '.join([name_field['d'], value])
    else:
        dates_field = value

    name_field['d'] = dates_field

    return name_field
468272
def initial_individual(self):
        """"""
        ind = creator.Individual(
            [random.uniform(-1, 1)
             for _ in range(len(self._params['value_means']))])
        return ind
775928
def declared_date(self, value):
        
        if value:
            self._declared_date = parse(value).date() if isinstance(value, type_check) else value
531319
def date_from_number(self, value):
        
        if not isinstance(value, numbers.Real):
            return None
        delta = datetime.timedelta(days=value)
        return self._null_date + delta
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
911381
def get_initial(self, *args, **kwargs):
        
        initial = {}
        for field in self.fields:
            value = None
            if hasattr(self.user, field):
                value = getattr(self.user, field)
            if hasattr(self.profile, field):
                value = getattr(self.profile, field)
            if value:
                initial.update({
                    field: value
                })

        if hasattr(self.profile, 'dob'):
            dob = self.profile.dob
            if dob:
                if 'dob_day' in self.fields:
                    initial.update({
                        'dob_day': dob.day
                    })
                if 'dob_month' in self.fields:
                    initial.update({
                        'dob_month': dob.month
                    })
                if 'dob_year' in self.fields:
                    initial.update({
                        'dob_year': dob.year
                    })

        return initial