/** * Convenience overload. * @stable ICU 2.0 */ static final public DateFormat getInstance(Calendar cal, Locale locale) { return getDateTimeInstance(cal, DateFormat.MEDIUM, DateFormat.SHORT, locale); }
/** * Convenience overload. * @stable ICU 2.0 */ static final public DateFormat getInstance(Calendar cal, Locale locale) { return getDateTimeInstance(cal, DateFormat.MEDIUM, DateFormat.SHORT, locale); }
/** * Returns a date/time formatter that uses the SHORT style * for both the date and the time. * * @param cal The calendar system for which a date/time format is desired. * @param locale The locale for which the date/time format is desired. * @stable ICU 3.2 * @provisional This API might change or be removed in a future release. */ static final public DateFormat getInstance(Calendar cal, ULocale locale) { return getDateTimeInstance(cal, SHORT, SHORT, locale); }
/** * Convenience overload. * @stable ICU 3.2 * @provisional This API might change or be removed in a future release. */ static final public DateFormat getInstance(Calendar cal, ULocale locale) { return getDateTimeInstance(cal, DateFormat.MEDIUM, DateFormat.SHORT, locale); }
/** * Convenience overload. * @stable ICU 3.2 * @provisional This API might change or be removed in a future release. */ static final public DateFormat getInstance(Calendar cal, ULocale locale) { return getDateTimeInstance(cal, DateFormat.MEDIUM, DateFormat.SHORT, locale); }
private DateFormat getStockDateFormatter() { if (stockDateFormatter == null) { stockDateFormatter = DateFormat.getDateTimeInstance( DateFormat.SHORT, DateFormat.SHORT, ulocale);//fix } return stockDateFormatter; } private NumberFormat getStockNumberFormatter() {
@Override public DateFormat call() throws Exception { return DateFormat.getDateTimeInstance(dateStyle, timeStyle, locale); } });
public DeltaSession(String description, IDelta delta, String baselineName) { this.delta = delta; this.baselineName = baselineName; this.timestamp = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM).format(new Date(System.currentTimeMillis())); this.description = description; }
public DeltaSession(String description, IDelta delta, String baselineName) { this.delta = delta; this.baselineName = baselineName; this.timestamp = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM).format(new Date(System.currentTimeMillis())); this.description = description; } public ITreeModel getModel() {
/** * Convenience overload. * @stable ICU 2.0 */ static final public DateFormat getDateTimeInstance(Calendar cal, int dateStyle, int timeStyle) { return getDateTimeInstance(cal, dateStyle, timeStyle, ULocale.getDefault(Category.FORMAT)); }
/** * Returns a date/time formatter that uses the SHORT style * for both the date and the time. * * @param cal The calendar system for which a date/time format is desired. * @param locale The locale for which the date/time format is desired. * @stable ICU 2.0 */ static final public DateFormat getInstance(Calendar cal, Locale locale) { return getDateTimeInstance(cal, SHORT, SHORT, ULocale.forLocale(locale)); }
public String getLabel(Object o) { if (isCurrent) return ProvUIMessages.RollbackProfileElement_CurrentInstallation; return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG).format(new Date(timestamp)); }
/** * Convenience overload. * @stable ICU 2.0 */ static final public DateFormat getDateTimeInstance(Calendar cal, int dateStyle, int timeStyle) { return getDateTimeInstance(cal, dateStyle, timeStyle, ULocale.getDefault(Category.FORMAT)); }
/** * Return the human readable timestamp of this element. * @return the human readable timestamp of this element */ public String getTimestamp() { long date = fileRevision.getTimestamp(); Date dateFromLong = new Date(date); return DateFormat.getDateTimeInstance().format(dateFromLong); }
/** * Returns the creation time of the marker as a string. */ static String getCreationTime(IMarker marker) { try { return DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.MEDIUM).format( new Date(marker.getCreationTime())); } catch (CoreException e) { return null; } } }
/** * Returns the creation time of the marker as a string. */ public static String getCreationTime(IMarker marker) { try { return DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.MEDIUM).format( new Date(marker.getCreationTime())); } catch (CoreException e) { return null; } } }
/** * Return the human readable timestamp of this element. * @return the human readable timestamp of this element */ public String getTimestamp() { long date = fileRevision.getTimestamp(); Date dateFromLong = new Date(date); return DateFormat.getDateTimeInstance().format(dateFromLong); }
protected String getEditionLabel(HistoryInput input) { String format= Utilities.getString(fBundle, "historyEditionLabel", null); //$NON-NLS-1$ if (format == null) format= Utilities.getString(fBundle, "editionLabel"); //$NON-NLS-1$ if (format == null) format= "x{0}"; //$NON-NLS-1$ long modDate= input.getModificationDate(); String date= DateFormat.getDateTimeInstance().format(new Date(modDate)); return MessageFormat.format(format, new Object[] { date }); }
protected String getEditionLabel(HistoryInput input) { String format= Utilities.getString(fBundle, "historyEditionLabel", null); //$NON-NLS-1$ if (format == null) format= Utilities.getString(fBundle, "editionLabel"); //$NON-NLS-1$ if (format == null) format= "x{0}"; //$NON-NLS-1$ long modDate= input.getModificationDate(); String date= DateFormat.getDateTimeInstance().format(new Date(modDate)); return MessageFormat.format(format, date); }
protected boolean isLeafMatch(Viewer viewer, Object element) { if (element instanceof LogEntry) { LogEntry logEntry = (LogEntry) element; String message = logEntry.getMessage(); String plugin = logEntry.getPluginId(); DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT); String date = dateFormat.format(logEntry.getDate()); return wordMatches(message) || wordMatches(plugin) || wordMatches(date); } return false; } };