Add the default for the Date being the current day.
189505
public function populateDefaults()
    {
        parent::populateDefaults();

        if (!isset($this->Date) || $this->Date === null) {
            $this->Date = DBDatetime::now()->Format('y-MM-dd 09:00:00');
        }
    }
713980
public static Date toDate(Object value, Date defaultValue) {
		return convert(Date.class, value, defaultValue);
	}
426667
public ProjectCalendar addDefaultDerivedCalendar()
   {
      ProjectCalendar calendar = add();

      calendar.setWorkingDay(Day.SUNDAY, DayType.DEFAULT);
      calendar.setWorkingDay(Day.MONDAY, DayType.DEFAULT);
      calendar.setWorkingDay(Day.TUESDAY, DayType.DEFAULT);
      calendar.setWorkingDay(Day.WEDNESDAY, DayType.DEFAULT);
      calendar.setWorkingDay(Day.THURSDAY, DayType.DEFAULT);
      calendar.setWorkingDay(Day.FRIDAY, DayType.DEFAULT);
      calendar.setWorkingDay(Day.SATURDAY, DayType.DEFAULT);

      return (calendar);
   }
759920
def __set_date(self, value):
        '''
        
        '''
        if not issubclass(value.__class__, date):
            raise ValueError('Invalid date value')

        self.__date = value
255696
def add_date(self, date):
        
        self.lines = self.parser.add_date(date, self.lines)
505502
static public Date adjustDate(Date date)
  {
    long milliToAdjust = ResultUtil.msDiffJulianToGregorian(date);

    if (milliToAdjust != 0)
    {
      // add the difference to the new date
      return new Date(date.getTime() + milliToAdjust);
    }
    else
    {
      return date;
    }
  }
135514
private void setCalendarToLastRelativeDay(Calendar calendar)
   {
      calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
      int currentDayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
      int requiredDayOfWeek = getDayOfWeek().getValue();
      int dayOfWeekOffset = 0;

      if (currentDayOfWeek > requiredDayOfWeek)
      {
         dayOfWeekOffset = requiredDayOfWeek - currentDayOfWeek;
      }
      else
      {
         if (currentDayOfWeek < requiredDayOfWeek)
         {
            dayOfWeekOffset = -7 + (requiredDayOfWeek - currentDayOfWeek);
         }
      }

      if (dayOfWeekOffset != 0)
      {
         calendar.add(Calendar.DAY_OF_YEAR, dayOfWeekOffset);
      }
   }
1322201
def get_month_start(day=None):
    """"""
    day = add_timezone(day or datetime.date.today())
    return day.replace(day=1)
1203291
def add_time(data):
    
    payload = data['data']
    updated = data['updated'].date()
    if updated == date.today():
        payload['last_updated'] = data['updated'].strftime('today at %H:%M:%S')
    elif updated >= (date.today() - timedelta(days=1)):
        payload['last_updated'] = 'yesterday'
    elif updated >= (date.today() - timedelta(days=7)):
        payload['last_updated'] = updated.strftime('on %A')
    else:
        payload['last_updated'] = updated.strftime('%Y-%m-%d')
    return payload
78414
def date(self, date):
        """"""
        self._occurrence_data['date'] = self._utils.format_datetime(
            date, date_format='%Y-%m-%dT%H:%M:%SZ'
        )
133750
public void goToDate(Calendar date) {
        mScroller.forceFinished(true);
        mCurrentScrollDirection = mCurrentFlingDirection = Direction.NONE;

        date.set(Calendar.HOUR_OF_DAY, 0);
        date.set(Calendar.MINUTE, 0);
        date.set(Calendar.SECOND, 0);
        date.set(Calendar.MILLISECOND, 0);

        if(mAreDimensionsInvalid) {
            mScrollToDay = date;
            return;
        }

        mRefreshEvents = true;

        Calendar today = Calendar.getInstance();
        today.set(Calendar.HOUR_OF_DAY, 0);
        today.set(Calendar.MINUTE, 0);
        today.set(Calendar.SECOND, 0);
        today.set(Calendar.MILLISECOND, 0);

        long day = 1000L * 60L * 60L * 24L;
        long dateInMillis = date.getTimeInMillis() + date.getTimeZone().getOffset(date.getTimeInMillis());
        long todayInMillis = today.getTimeInMillis() + today.getTimeZone().getOffset(today.getTimeInMillis());
        long dateDifference = (dateInMillis/day) - (todayInMillis/day);
        mCurrentOrigin.x = - dateDifference * (mWidthPerDay + mColumnGap);
        invalidate();
    }
890278
public static Date addDay(Date date, int amt) {
		return addDateField(date,Calendar.DATE,amt);
	}
293499
function(elem) {
			var inst = this._getInst(elem);
			if (!$.isEmptyObject(inst)) {
				inst.selectedDates = [];
				this.hide(elem);
				var defaultDate = inst.get('defaultDate');
				if (inst.options.selectDefaultDate && defaultDate) {
					this.setDate(elem, (defaultDate || inst.options.calendar.today()).newDate());
				}
				else {
					this._updateInput(elem);
				}
			}
		}
16621
public function setCurrentTime(): self
	{
		return $this->modifyClone()->setTime((int) date('H'), (int) date('i'), (int) date('s'));
	}
276964
def add_date(log):
    ''''''
    return '{base} - {time}.log'.format(
			base=os.path.splitext(log)[0],
			time=strftime("%a, %d %b %Y %H-%M-%S", gmtime()))
399515
def __set_due_date(self, value):
        '''
        
        '''
        if type(value) != date:
            raise ValueError('Due date must be an instance of date.')

        if self.__date.date() and value < self.__date.date():
            raise ValueError("Due date cannot be anterior to the invoice " \
                             "date.")

        self.__due_date = value
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)