Initialize all dates properties
7154
def _init_dates(self):
        
        if self.total_transactions == 0:
            return None
        self.epoch_start = Result.select(Result.epoch).order_by(Result.epoch.asc()).limit(1).get().epoch
        self.epoch_finish = Result.select(Result.epoch).order_by(Result.epoch.desc()).limit(1).get().epoch
        self.start_datetime = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(self.epoch_start))
        self.finish_datetime = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(self.epoch_finish))
676088
public static void initGlobals()
    {
        if (gDateFormat == null)
        {   // NOTE: You MUST synchronize before using any of these
            // For dates and times, synchronize on the gCalendar
            gCalendar = Calendar.getInstance();

            gDateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM);
            gTimeFormat = DateFormat.getTimeInstance(DateFormat.SHORT);
            gLongTimeFormat = DateFormat.getTimeInstance(DateFormat.MEDIUM);
            gDateTimeFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT);
            gLongDateTimeFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);
            gDateShortFormat = DateFormat.getDateInstance(DateFormat.SHORT);
            gDateShortTimeFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
            gGMTDateTimeFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);

            gDateSqlFormat = gDateShortFormat;  // By default use these formats - Change if different
            gTimeSqlFormat = gTimeFormat;
            gDateTimeSqlFormat = gDateShortTimeFormat;
            // For all of these, synchronize on the object you are using
            gIntegerFormat = NumberFormat.getInstance();
            gIntegerFormat.setParseIntegerOnly(true);

            gCurrencyFormat = NumberFormat.getCurrencyInstance();
            
            gNumberFormat = NumberFormat.getInstance();
            gNumberFormat.setParseIntegerOnly(false);
            gNumberFormat.setMinimumFractionDigits(2);
            gNumberFormat.setMaximumFractionDigits(2);
            if (gNumberFormat instanceof DecimalFormat)
            {
                gchDot = ((DecimalFormat)gNumberFormat).getDecimalFormatSymbols().getDecimalSeparator();
                gchMinus = ((DecimalFormat)gNumberFormat).getDecimalFormatSymbols().getMinusSign();
            }

            gPercentFormat = NumberFormat.getPercentInstance();
        }
    }
1189374
void initializeData(DateFormatSymbols dfs) {
        this.eras = dfs.eras;
        this.eraNames = dfs.eraNames;
        this.narrowEras = dfs.narrowEras;
        this.months = dfs.months;
        this.shortMonths = dfs.shortMonths;
        this.narrowMonths = dfs.narrowMonths;
        this.standaloneMonths = dfs.standaloneMonths;
        this.standaloneShortMonths = dfs.standaloneShortMonths;
        this.standaloneNarrowMonths = dfs.standaloneNarrowMonths;
        this.weekdays = dfs.weekdays;
        this.shortWeekdays = dfs.shortWeekdays;
        this.shorterWeekdays = dfs.shorterWeekdays;
        this.narrowWeekdays = dfs.narrowWeekdays;
        this.standaloneWeekdays = dfs.standaloneWeekdays;
        this.standaloneShortWeekdays = dfs.standaloneShortWeekdays;
        this.standaloneShorterWeekdays = dfs.standaloneShorterWeekdays;
        this.standaloneNarrowWeekdays = dfs.standaloneNarrowWeekdays;
        this.ampms = dfs.ampms;
        this.ampmsNarrow = dfs.ampmsNarrow;
        this.timeSeparator = dfs.timeSeparator;
        this.shortQuarters = dfs.shortQuarters;
        this.quarters = dfs.quarters;
        this.standaloneShortQuarters = dfs.standaloneShortQuarters;
        this.standaloneQuarters = dfs.standaloneQuarters;
        this.leapMonthPatterns = dfs.leapMonthPatterns;
        this.shortYearNames = dfs.shortYearNames;
        this.shortZodiacNames = dfs.shortZodiacNames;
        this.abbreviatedDayPeriods = dfs.abbreviatedDayPeriods;
        this.wideDayPeriods = dfs.wideDayPeriods;
        this.narrowDayPeriods = dfs.narrowDayPeriods;
        this.standaloneAbbreviatedDayPeriods = dfs.standaloneAbbreviatedDayPeriods;
        this.standaloneWideDayPeriods = dfs.standaloneWideDayPeriods;
        this.standaloneNarrowDayPeriods = dfs.standaloneNarrowDayPeriods;

        this.zoneStrings = dfs.zoneStrings; // always null at initialization time for now
        this.localPatternChars = dfs.localPatternChars;

        this.capitalization = dfs.capitalization;

        this.actualLocale = dfs.actualLocale;
        this.validLocale = dfs.validLocale;
        this.requestedLocale = dfs.requestedLocale;
    }
91827
def _parse_dates(self, prop=DATES):
        

        return parse_dates(self._xml_tree, self._data_structures[prop])
1282782
private void initialize() throws LockingException {
        Date expiration = new Date(System.currentTimeMillis() - (60 * 60 * 1000));
        deleteExpired(expiration, null, null);
    }
729811
private void initDefaultValues() {

    this.defaultValues.put(BigDecimal.class, new BigDecimal(0.0d));
    this.defaultValues.put(BigInteger.class, new BigInteger("0"));
    this.defaultValues.put(Boolean.class, false);
    this.defaultValues.put(Byte.class, (byte) 0);
    this.defaultValues.put(Calendar.class, CalendarValueSupplier.INSTANCE);
    this.defaultValues.put(Character.class, '\0');
    this.defaultValues.put(Double.class, 0.0d);
    this.defaultValues.put(Enum.class, null);
    this.defaultValues.put(Float.class, 0.0f);
    this.defaultValues.put(Integer.class, 0);
    this.defaultValues.put(Identifiable.class, null);
    this.defaultValues.put(Long.class, 0L);
    this.defaultValues.put(Short.class, (short) 0);
    this.defaultValues.put(String.class, null);
  }
612988
private void populateDateTimeSettings(Record record, ProjectProperties properties)
   {
      properties.setDateOrder(record.getDateOrder(0));
      properties.setTimeFormat(record.getTimeFormat(1));

      Date time = getTimeFromInteger(record.getInteger(2));
      if (time != null)
      {
         properties.setDefaultStartTime(time);
      }

      Character c = record.getCharacter(3);
      if (c != null)
      {
         properties.setDateSeparator(c.charValue());
      }

      c = record.getCharacter(4);
      if (c != null)
      {
         properties.setTimeSeparator(c.charValue());
      }

      properties.setAMText(record.getString(5));
      properties.setPMText(record.getString(6));
      properties.setDateFormat(record.getDateFormat(7));
      properties.setBarTextDateFormat(record.getDateFormat(8));
   }
345254
protected void init() {
		JButton testButton = new JButton();
		oldDayBackgroundColor = testButton.getBackground();
		selectedColor = new Color(160, 160, 160);

		Date date = calendar.getTime();
		calendar = Calendar.getInstance(locale);
		calendar.setTime(date);

		drawDayNames();
		drawDays();
	}
456190
private function _buildDates()
    {
        if ( !$this->from || !$this->to || $this->from > $this->to ) {
            return;
        }
        $this->dates = array();
        $d = clone $this->from;
        $this->dates[] = clone $d;
        while ( $d != $this->to ) {
            $d->add(new \DateInterval('P1D'));
            $this->dates[] = clone $d;
        }
    }
1257477
def _serialize(self, value, attr, obj):
        """"""
        try:
            return super(DateString, self)._serialize(
                arrow.get(value).date(), attr, obj)
        except ParserError:
            return missing
361774
protected void setDate(Date date, boolean firePropertyChange) {
		Date oldDate = this.date;
		this.date = date;

		if (date == null) {
			setText("");
		} else {
			String formattedDate = dateFormatter.format(date);
			try {
				setText(formattedDate);
			} catch (RuntimeException e) {
				e.printStackTrace();
			}
		}
		if (date != null && dateUtil.checkDate(date)) {
			setForeground(Color.BLACK);

		}

		if (firePropertyChange) {
			firePropertyChange("date", oldDate, date);
		}
	}
122095
def property(self, key, default=None):
        
        if key == 'Name':
            return self.name()
        elif key == 'Start':
            return self.dateStart()
        elif key == 'End':
            return self.dateEnd()
        elif key == 'Calendar Days':
            return self.duration()
        elif key == 'Work Days':
            return self.weekdays()
        elif key == 'Time Start':
            return self.timeStart()
        elif key == 'Time End':
            return self.timeEnd()
        elif key == 'All Day':
            return self.isAllDay()
        else:
            return self._properties.get(nativestring(key), default)
780778
@Override
	public void setUpdateParams(final SqlContext context, final Object entity) {
		setFields(context, entity, SqlKind.UPDATE, MappingColumn::getCamelName);
	}
1177306
protected void initialize() {
        this.mappedFields = new HashMap<String, PropertyDescriptor>();
        PropertyDescriptor[] pds = BeanUtils.getPropertyDescriptors(mappedClass);
        if (checkProperties) {
            mappedProperties = new HashSet<String>();
        }
        for (int i = 0; i < pds.length; i++) {
            PropertyDescriptor pd = pds[i];
            if (pd.getWriteMethod() != null) {
                if (checkProperties) {
                    this.mappedProperties.add(pd.getName());
                }
                this.mappedFields.put(pd.getName().toLowerCase(), pd);
                for (String underscoredName : underscoreName(pd.getName())) {
                    if (underscoredName != null
                            && !pd.getName().toLowerCase().equals(underscoredName)) {
                        this.mappedFields.put(underscoredName, pd);
                    }
                }
            }
        }
    }
86984
public void init(App application, String strParams, Map<String, Object> properties)
    {
        super.init(application, strParams, properties);
    }
326834
function SimpleDate(){
    this._monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
    this._monthNamesShort = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];

    var tempDate = new Date();
    this.setYear(tempDate.getFullYear());
    this.setMonth(tempDate.getMonth());
    this.setDate(tempDate.getDate());

    if(arguments[0] != null) {
        if (arguments[0] instanceof Date) {
            tempDate = arguments[0];

            this.setYear(tempDate.getFullYear());
            this.setMonth(tempDate.getMonth());
            this.setDate(tempDate.getDate());
        } else if(arguments[0] instanceof SimpleDate) {
            this.setYear(arguments[0].getYear());
            this.setMonth(arguments[0].getMonth());
            this.setDate(arguments[0].getDate());
        } else if(arguments[0] instanceof Object) {
            var obj = arguments[0];
            if(obj.year != null && obj.month != null && obj.date != null) {
                this.setYear(obj.year);
                this.setMonth(obj.month);
                this.setDate(obj.date);
            } else {
                this.setYear(tempDate.getFullYear());
                this.setMonth(tempDate.getMonth());
                this.setDate(tempDate.getDate());
            }
        }else {
            try {
                this.setYear(parseInt(arguments[0]));
                this.setMonth(parseInt(arguments[1]));
                this.setDate(parseInt(arguments[2]));
            }catch(e) {
                this.setYear(tempDate.getFullYear());
                this.setMonth(tempDate.getMonth());
                this.setDate(tempDate.getDate());
            }
        }
    }
}
1350491
public void init(String strDateParam, Date dateTarget, String strLanguage)
    {
        if (strDateParam != null)
            dateParam = strDateParam;      // Property name
        initComponents();
        this.setName("JCalendarPopup");

        nowDate = new Date();
        if (dateTarget == null)
            dateTarget = nowDate;
        selectedDate = dateTarget;

        if (strLanguage != null)
        {
            Locale locale = new Locale(strLanguage, "");
            if (locale != null)
            {
                calendar = Calendar.getInstance(locale);
                dateFormat = DateFormat.getDateInstance(DateFormat.FULL, locale);
            }
        }
        calendar.setTime(dateTarget);
        calendar.set(Calendar.HOUR_OF_DAY, 12);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        targetDate = calendar.getTime();
        this.layoutCalendar(targetDate);
        if (dateTarget == nowDate)
            selectedDate = targetDate;  // If they want a default date, make the time 12:00
    }