Get time format in CLDR standard format

This can be set explicitly. If not, this will be generated from the current locale
with the current time length.

@see http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Field-Symbol-Table
169693
public function getTimeFormat()
    {
        if ($this->getHTML5()) {
            // Browsers expect ISO 8601 times, localisation is handled on the client
            $this->setTimeFormat(DBTime::ISO_TIME);
        }

        if ($this->timeFormat) {
            return $this->timeFormat;
        }

        // Get from locale
        return $this->getFrontendFormatter()->getPattern();
    }
472989
public static String getTimestamp(Date time) {
        return getTimestampFormatter().format(time == null ? new Date() : time);
    }
310452
public static String getDateTimeShort(long time) {

        return getDateTime(new Date(time), DateFormat.SHORT, CmsLocaleManager.getDefaultLocale());
    }
808814
public final static DateFormat getDateTimeInstance()
    {
        return get(DEFAULT, DEFAULT, 3, Locale.getDefault(Locale.Category.FORMAT));
    }
1176081
public DateFormat getDateTimeFormat(int dateStyle, int timeStyle, Locale loc) {
        return formatHelper(this, ULocale.forLocale(loc), dateStyle, timeStyle);
    }
1091193
protected function getInternalFormatter()
    {
        $formatter = $this->getCustomFormatter(DBDate::ISO_LOCALE, DBDate::ISO_DATE);
        $formatter->setLenient(false);
        return $formatter;
    }
1010017
public String toIcal() {
        StringBuilder buf = new StringBuilder();
        buf.append(this.getName().toUpperCase());
        buf.append(";TZID=\"").append(tzid.getID()).append('"');
        buf.append(";VALUE=").append(valueType.toIcal());
        if (hasExtParams()) {
            for (Map.Entry<String, String> param : getExtParams().entrySet()) {
                String k = param.getKey(),
                        v = param.getValue();
                if (ICAL_SPECIALS.matcher(v).find()) {
                    v = "\"" + v + "\"";
                }
                buf.append(';').append(k).append('=').append(v);
            }
        }
        buf.append(':');
        for (int i = 0; i < datesUtc.length; ++i) {
            if (0 != i) {
                buf.append(',');
            }
            DateValue v = datesUtc[i];
            buf.append(v);
            if (v instanceof TimeValue) {
                buf.append('Z');
            }
        }
        return buf.toString();
    }
1209671
public static DateTime toDateTime(Locale locale, String str, TimeZone tz, boolean useCommomDateParserAsWell) throws PageException {

	DateTime dt = toDateTime(locale, str, tz, null, useCommomDateParserAsWell);
	if (dt == null) {
	    String prefix = locale.getLanguage() + "-" + locale.getCountry() + "-";
	    throw new ExpressionException("can't cast [" + str + "] to date value",
		    "to add custom formats for " + LocaleFactory.toString(locale) + ", create/extend on of the following files [" + prefix + "datetime.df (for date time formats), "
			    + prefix + "date.df (for date formats) or " + prefix + "time.df (for time formats)] in the following directory [<context>/lucee/locales]." + "");

	    // throw new ExpressionException("can't cast ["+str+"] to date value");
	}
	return dt;
    }
142209
protected function getInternalFormatter()
    {
        $formatter = $this->getCustomFormatter(DBDate::ISO_LOCALE, DBDatetime::ISO_DATETIME);
        $formatter->setLenient(false);
        return $formatter;
    }
394657
public static SimpleDateFormat getDateFormat(TimeType timeType) {
        if (timeType == null) {
            timeType = TimeType.DEFAULT;
        }
        SimpleDateFormat sdf = simpleDateFormatMap.get(timeType);
        if (sdf == null) {
            sdf = new SimpleDateFormat(timeType.getType());
            simpleDateFormatMap.put(timeType, sdf);
        }
        return sdf;
    }
922355
public static DateFormat getAlignedFormat() {
		if (DATE_FORMAT instanceof SimpleDateFormat) {
			SimpleDateFormat sdf = (SimpleDateFormat) DATE_FORMAT;
			String pattern = sdf.toPattern()
					.replaceAll("M+", "MM")
					.replaceAll("d+", "dd")
					.replaceAll("h+", "hh")
					.replaceAll("H+", "HH");
			sdf.applyPattern(pattern);
			return sdf;
		} else {
			return DATE_FORMAT;
		}
	}
983236
private String getFormattedDate(int dateTimeFormat) {

        DateFormat df;
        String result;
        if (isWholeDay()) {
            df = DateFormat.getDateInstance(dateTimeFormat, m_series.getLocale());
            result = df.format(getStart());
            if (getLastDay().after(getStart())) {
                result += DATE_SEPARATOR + df.format(getLastDay());
            }
        } else {
            df = DateFormat.getDateTimeInstance(dateTimeFormat, DateFormat.SHORT, m_series.getLocale());
            result = df.format(getStart());
            if (getEnd().after(getStart())) {
                if (isMultiDay()) {
                    result += DATE_SEPARATOR + df.format(getEnd());
                } else {
                    df = DateFormat.getTimeInstance(DateFormat.SHORT, m_series.getLocale());
                    result += DATE_SEPARATOR + df.format(getEnd());
                }
            }
        }

        return result;
    }
1247737
public String getTimeString()
	{
		Calendar cal = getCalendar();
		return
			toClockString(cal.get(Calendar.HOUR)) +
			(((cal.get(Calendar.SECOND) % 2) == 0) ? ":" : " ") +
			toClockString(cal.get(Calendar.MINUTE));
	}
812684
private String getFormattedDate(Date date) {
		String formattedDate = "";
		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		try {
			formattedDate = ValueFactoryImpl.getInstance().createValue(cal).getString();
		} catch (Exception e) {
			// should never happen
			e.printStackTrace();
		}
		return formattedDate;
	}
1248713
def timeFormat(time_from, time_to=None, prefix="", infix=None):
    
    retval = ""
    if time_from != "" and time_from is not None:
        retval += prefix
        retval += dateformat.time_format(time_from, "fA").lower()
    if time_to != "" and time_to is not None:
        to = format(dateformat.time_format(time_to, "fA").lower())
        if infix is not None:
            retval = "{} {} {}".format(retval, infix, to)
        else:
            retval = _("{fromTime} to {toTime}").format(fromTime=retval,
                                                        toTime=to)
    return retval.strip()
102636
public function getDateFormat()
    {
        $formatter = new IntlDateFormatter(
            $this->getLocale(),
            IntlDateFormatter::MEDIUM,
            IntlDateFormatter::NONE
        );
        $format = $formatter->getPattern();

        $this->extend('updateDateFormat', $format);

        return $format;
    }
183331
private String getFormattedTimestamp(int offset) {
        SimpleDateFormat df = new SimpleDateFormat(
                "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
        df.setTimeZone(TimeZone.getTimeZone("UTC"));

        if (overriddenDate != null) {
            return df.format(overriddenDate);
        } else {
            return df.format(getSignatureDate(offset));
        }
    }