Creates a label which displays date only (year, month, day).

@param id    component id
@param model    model returning date to display
@return date label
485076
public static DateLabel forDate(String id, IModel<Date> model) {
        return DateLabel.forDatePattern(id, model, DATE_PATTERN);
    }
1226849
public String dateToString(D date) {
    try {
      return String.format(DATE_PATTERN,
          (Integer) PropertyUtils.getProperty(date, "year"),
          (Integer) PropertyUtils.getProperty(date, "month"),
          (Integer) PropertyUtils.getProperty(date, "day"));
    } catch (IllegalAccessException e) {
      throw new IllegalStateException("Could not access class.", e);
    } catch (InvocationTargetException e) {
      throw new IllegalStateException("Could not get field.", e);
    } catch (NoSuchMethodException e) {
      throw new IllegalStateException("Could not get field.", e);
    }
  }
1248835
protected Label newActionLinkLabel(final String id, final IModel<String> model)
	{
		final Label label = ComponentFactory.newLabel(id, model);
		return label;
	}
1286533
private String[] createLabels(final String id, final Object[] keys)
    {
        String[] messages = new String[keys.length];
        for (int i = 0; i < messages.length; ++i)
        {
            messages[i] = getApplicationConfig().messageResolver().getMessage(id, keys[i] == null ? "null" : keys[i].toString(),
                    "label");
        }
        return messages;
    }
239935
public T byId(Object id) {
        this.beforeCheck();
        this.where(primaryKeyColumn, id);

        String sql = this.buildSelectSQL(false);

        T model = this.queryOne(modelClass, sql, paramValues);

        ifNotNullThen(model, () -> this.setJoin(Collections.singletonList(model)));

        return model;
    }
398419
@Override
    protected PlainDate getDate0(int year) {

        int month = this.getMonth().getValue();
        int dayOfMonth = GregorianMath.getLengthOfMonth(year, month) + 1 + this.domIndicator;
        int ref = GregorianMath.getDayOfWeek(year, month, dayOfMonth);
        PlainDate result = PlainDate.of(year, month, dayOfMonth);

        if (ref == this.dayOfWeek) {
            return result;
        }

        int delta = (this.dayOfWeek - ref);

        if (delta > 0) {
            delta -= 7;
        }

        return result.plus(delta, DAYS);

    }
195367
protected D createModelWithId(Object id, T entity) {
		return createModelWithId(id, entity, new Object[0]);
	}
957914
public static String getStatusLabelDetailsInString(final String value, final String style, final String id) {
        final StringBuilder val = new StringBuilder();
        if (!StringUtils.isEmpty(value)) {
            val.append("value:").append(value).append(",");
        }
        if (!StringUtils.isEmpty(style)) {
            val.append("style:").append(style).append(",");
        }
        return val.append("id:").append(id).toString();
    }
1111807
public String formatId(long id) {
		long[] arr = parseId(id);
		String tmf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date(arr[0]));
		return String.format("%s, #%d, @(%d,%d)", tmf, arr[3], arr[1], arr[2]);
	}
142760
protected Label createTitleLabel(String id, PivotField pivotField) {
		String title = pivotField.getTitle();
		if (pivotField.getArea().equals(PivotField.Area.DATA)) {
			title += " (" + pivotField.getAggregator().getFunction().toUpperCase() + ")"; 
		}

		return new Label(id, title);
	}
603042
public static <T> MultiLineLabel newMultiLineLabel(final String id, final IModel<T> model)
	{
		final MultiLineLabel multiLineLabel = new MultiLineLabel(id, model);
		multiLineLabel.setOutputMarkupId(true);
		return multiLineLabel;
	}
281123
def day_view(request, year, month, day, template='swingtime/daily_view.html', **params):
    '''
    

    '''
    dt = datetime(int(year), int(month), int(day))
    return _datetime_view(request, template, dt, **params)
237950
public static String formatDate(Calendar calendar, boolean cookie)
    {
        StringBuffer buf = new StringBuffer(32);
        formatDate(buf,calendar,cookie);
        return buf.toString();
    }
38212
protected LabeledTextAreaPanel<String, DeregistrationModelBean> newMotivation(final String id,
		final IModel<DeregistrationModelBean> model)
	{
		final IModel<String> labelModel = ResourceModelFactory.newResourceModel(
			ResourceBundleKey.builder().key("sem.main.feedback.deregistration.user.label")
				.defaultValue("Please confirm the deregistration")
				.parameters(ListExtensions.toObjectArray(getDomainName())).build(),
			this);
		final IModel<String> placeholderModel = ResourceModelFactory.newResourceModel(
			"global.enter.your.deregistration.motivation.label", this,
			"Enter here your deregistration motivation.");
		final LabeledTextAreaPanel<String, DeregistrationModelBean> description = new LabeledTextAreaPanel<String, DeregistrationModelBean>(
			id, model, labelModel)
		{
			/** The Constant serialVersionUID. */
			private static final long serialVersionUID = 1L;

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected TextArea<String> newTextArea(final String id,
				final IModel<DeregistrationModelBean> model)
			{
				final TextArea<String> textArea = super.newTextArea(id, model);
				if (placeholderModel != null)
				{
					textArea.add(new AttributeAppender("placeholder", placeholderModel));
				}
				return textArea;
			}
		};
		return description;
	}
889922
private void labelYearIndicatorMousePressed(MouseEvent e) {
        // If the year menu is disabled, then return.
        if (settings.getEnableYearMenu() == false) {
            return;
        }
        // Create and show the year menu.
        int firstYearDifference = -11;
        int lastYearDifference = +11;
        JPopupMenu yearPopupMenu = new JPopupMenu();
        for (int yearDifference = firstYearDifference; yearDifference <= lastYearDifference;
            ++yearDifference) {
            // No special processing is required for the BC to AD transition in the 
            // ISO 8601 calendar system. Year zero does exist in this system.
            // This try block handles exceptions that can occur at LocalDate.MAX.
            try {
                YearMonth choiceYearMonth = displayedYearMonth.plusYears(yearDifference);
                String choiceYearMonthString = "" + choiceYearMonth.getYear();
                yearPopupMenu.add(new JMenuItem(new AbstractAction(choiceYearMonthString) {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        String chosenMenuText = ((JMenuItem) e.getSource()).getText();
                        int chosenYear = Integer.parseInt(chosenMenuText);
                        drawCalendar(chosenYear, displayedYearMonth.getMonth());
                    }
                }));
            } catch (Exception ex) {
            }
        }
        String choiceOtherYearString = "( . . . )";
        yearPopupMenu.add(new JMenuItem(new AbstractAction(choiceOtherYearString) {
            @Override
            public void actionPerformed(ActionEvent e) {
                otherYearMenuItemClicked();
            }
        }));
        Point menuLocation = getMonthOrYearMenuLocation(labelYear, yearPopupMenu);
        yearPopupMenu.show(monthAndYearInnerPanel, menuLocation.x, menuLocation.y);
    }
302297
public static <T> Label newLabel(final String id, final String forId, final IModel<T> model)
	{
		final Label label = new Label(id, model);
		label.add(new AttributeAppender("for", Model.of(forId), " "));
		label.setOutputMarkupId(true);
		return label;
	}
218358
protected String onGetObject(final IModel<T> rowModel)
	{
		final IModel<?> propertyModel = DateColumn.this.getDataModel(rowModel);
		final Date value = (Date)propertyModel.getObject();
		if (value == null) {
			return "";
		}
		final SimpleDateFormat format = new SimpleDateFormat(dateFormat);
		return format.format(value);
	}