Set date to today
496613
public function setToday(): self
	{
		return $this->modifyClone()->setDate((int) date('Y'), (int) date('m'), (int) date('d'));
	}
462747
private void selectDefaultDate() {
        Calendar today = Calendar.getInstance();
        int hour = -1, minute = -1;

        // get the next possible selection
        Calendar date = getNextItemDate(today);
        // if it is the today item, we need to take a look the time
        if(date != null && DateSpinner.compareCalendarDates(date, today) == 0) {
            // same as getNextTimeDate for TimeSpinner
            final int last = timeSpinner.getLastItemPosition();
            final int searchHour = today.get(Calendar.HOUR_OF_DAY),
                    searchMinute = today.get(Calendar.MINUTE);
            for (int i=0; i<=last; i++) {
                final TimeItem time = ((TimeItem) timeSpinner.getItemAtPosition(i));
                if(time.getHour() > searchHour || (time.getHour() == searchHour && time.getMinute() >= searchMinute)) {
                    hour = time.getHour();
                    minute = time.getMinute();
                    break;
                }
            }

            // it may be too late in the evening to select the today item
            // or if FLAG_HIDE_TIME has been set, set it to tomorrow morning:
            if((hour == -1 && minute == -1) || shouldHideTime) {
                Calendar tomorrow = (Calendar) today.clone();
                tomorrow.add(Calendar.DAY_OF_YEAR, 1);
                date = getNextItemDate(tomorrow); // if this returns null it'll be set to today below
            }
        }
        if(date == null) {
            // it seems this spinner only contains past items, use the last one
            date = ((DateItem) dateSpinner.getItemAtPosition(dateSpinner.getLastItemPosition())).getDate();
        }

        if(hour == -1 && minute == -1) {
            // the date is not today, just select the earliest possible time
            final TimeItem time = ((TimeItem) timeSpinner.getItemAtPosition(0));
            hour = time.getHour();
            minute = time.getMinute();
        }

        // finally, select what we found
        date.set(Calendar.HOUR_OF_DAY, hour);
        date.set(Calendar.MINUTE, minute);
        setSelectedDate(date);
    }
1313567
function setDate(momentInstance, year, month, day) {
    var d = momentInstance._d;
    if (momentInstance._isUTC) {
        /*eslint-disable new-cap*/
        momentInstance._d = new Date(Date.UTC(year, month, day,
            d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds()));
        /*eslint-enable new-cap*/
    } else {
        momentInstance._d = new Date(year, month, day,
            d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds());
    }
}
149293
def today(self):
        """"""
        today = timezone.now().date()
        try:
            return Day.objects.get(date=today)
        except Day.DoesNotExist:
            return None
279116
def set(self, instance, value, **kwargs):
        
        val = get_date(instance, value)
        super(DateTimeField, self).set(instance, val, **kwargs)
319635
public final void setDateSeen(final Date pDateSeen) {
    if (pDateSeen == null) {
      this.dateSeen = null;
    } else {
      this.dateSeen = new Date(pDateSeen.getTime());
    }
  }
132293
public function setDate($t = null)
    {
        if ($t > 0) {
            $this->setText(date('Y-m-d H:i', $t));
        } else {
            $this->setText("");
        }
    }
75971
def daily(date=nil)
      date = DateTime.parse(date) if date.is_a?(String)
      if date.respond_to?(:yday)
        response = self.class.get("/daily/#{date.yday}/#{date.year}")
      else
        response = self.class.get('/daily')
      end
      response
    end
940908
public final void setItsDate(final Date pItsDate) {
    if (pItsDate == null) {
      this.itsDate = null;
    } else {
      this.itsDate = new Date(pItsDate.getTime());
    }
  }
223926
private function createDefaultShipmentDate() {
		$now = time();
		$weekDay = date('w', $now);

		if($weekDay === 0)
			$now += 86400; // Increase Day by 1 if Sunday

		return date('Y-m-d', $now);
	}
64504
function cellToDate() {
		var cellOffset = cellToCellOffset.apply(null, arguments);
		var dayOffset = cellOffsetToDayOffset(cellOffset);
		var date = dayOffsetToDate(dayOffset);
		return date;
	}
290349
def current_time(self, date):
        
        ret = self.command(
            'global.cgi?action=setCurrentTime&time={0}'.format(date)
        )

        if "ok" in ret.content.decode('utf-8').lower():
            return True

        return False
1207534
def set_time(self, time):
        '''
        
        '''
        times = num2date(time[:].squeeze(), time.units)
        self.time = pd.DatetimeIndex(pd.Series(times), tz=self.location.tz)
287915
function setMDY( $month, $day = 0, $year = 0 )
    {
        if ( $year != 0 )
            $date = mktime( 0, 0, 0, $month, $day, $year );
        else if ( $day != 0 )
            $date = mktime( 0, 0, 0, $month, $day );
        else
            $date = mktime( 0, 0, 0, $month );
        $this->Date = $date;
    }
1132933
function getFutureDays(days) {
    var now = new Date();
    now.setTime(now.getTime() + (days * 24 * 60 * 60 * 1000));
    return now;
}
569135
function(val, sendUpdatedEvt) {
	
	   // Don't try to parse a date if there is no date
	   if( val === '' ) {
	      inputEx.DateField.superclass.setValue.call(this, '', sendUpdatedEvt);
	      return;
	   }
	   var str = "";
	   if (val instanceof Date) {
			str = inputEx.DateField.formatDate(val, this.options.dateFormat);
	   } 
		else if(this.options.valueFormat){
			var dateVal = inputEx.DateField.parseWithFormat(val, this.options.valueFormat);
			str = inputEx.DateField.formatDate(dateVal, this.options.dateFormat);
		}
	   // else date must match this.options.dateFormat
	   else {
	     str = val;
	   }
	
	   inputEx.DateField.superclass.setValue.call(this, str, sendUpdatedEvt);
	}
66853
function(){
    var now = new Date();
    var nowUtc = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(),  now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds());
    return nowUtc.getTime();
  }