gpt4 book ai didi

org.eigenbase.util14.ZonelessDate类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 13:01:42 27 4
gpt4 key购买 nike

本文整理了Java中org.eigenbase.util14.ZonelessDate类的一些代码示例,展示了ZonelessDate类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZonelessDate类的具体详情如下:
包路径:org.eigenbase.util14.ZonelessDate
类名称:ZonelessDate

ZonelessDate介绍

[英]ZonelessDate is a date value without a time zone.
[中]ZonelessDate是一个没有时区的日期值。

代码示例

代码示例来源:origin: cascading/lingual-core

@Override
protected ZonelessDatetime createInstance()
 {
 return new ZonelessDate();
 }

代码示例来源:origin: net.hydromatic/optiq

/**
 * Parses a string as a ZonelessDate.
 *
 * @param s a string representing a date in ISO format, i.e. according to
 * the SimpleDateFormat string "yyyy-MM-dd"
 *
 * @return the parsed date, or null if parsing failed
 */
public static ZonelessDate parse(String s)
{
  return parse(s, DateTimeUtil.DateFormatStr);
}

代码示例来源:origin: org.apache.optiq/optiq-core

/**
 * Formats this ZonelessDate via a SimpleDateFormat
 *
 * @param format format string, as required by {@link SimpleDateFormat}
 * @return the formatted date string
 */
public String toString(String format) {
 DateFormat formatter = getFormatter(format);
 Date jdbcDate = getTempDate(getTime());
 return formatter.format(jdbcDate);
}

代码示例来源:origin: net.hydromatic/optiq

/**
 * Converts this ZonelessDate to a java.sql.Date and formats it via the
 * {@link java.sql.Date#toString() toString()} method of that class.
 *
 * @return the formatted date string
 */
public String toString()
{
  Date jdbcDate = getTempDate(getJdbcDate(DateTimeUtil.defaultZone));
  return jdbcDate.toString();
}

代码示例来源:origin: net.hydromatic/optiq

/**
 * Converts this literal to a {@link ZonelessDate} object.
 */
protected ZonelessDate getDate()
{
  ZonelessDate zd = new ZonelessDate();
  zd.setZonelessTime(getCal().getTimeInMillis());
  return zd;
}

代码示例来源:origin: net.hydromatic/optiq

public void setZonelessTime(long value)
{
  super.setZonelessTime(value);
  clearTime();
}

代码示例来源:origin: org.apache.optiq/optiq-core

/**
 * Returns e.g. '1969-07-21'.
 */
public String toFormattedString() {
 return getDate().toString(formatString);
}

代码示例来源:origin: net.hydromatic/optiq

public Object toJdbcObject()
{
  return new Date(getJdbcDate(DateTimeUtil.defaultZone));
}

代码示例来源:origin: org.apache.optiq/optiq-core

/**
 * Converts this literal to a {@link ZonelessDate} object.
 */
protected ZonelessDate getDate() {
 ZonelessDate zd = new ZonelessDate();
 zd.setZonelessTime(getCal().getTimeInMillis());
 return zd;
}

代码示例来源:origin: org.apache.optiq/optiq-core

/**
 * Converts this ZonelessDate to a java.sql.Date and formats it via the
 * {@link java.sql.Date#toString() toString()} method of that class.
 *
 * @return the formatted date string
 */
public String toString() {
 Date jdbcDate = getTempDate(getJdbcDate(DateTimeUtil.DEFAULT_ZONE));
 return jdbcDate.toString();
}

代码示例来源:origin: org.apache.optiq/optiq-core

public void setZonelessTime(long value) {
 super.setZonelessTime(value);
 clearTime();
}

代码示例来源:origin: net.hydromatic/optiq

/**
 * Returns e.g. '1969-07-21'.
 */
public String toFormattedString()
{
  return getDate().toString(formatString);
}

代码示例来源:origin: org.apache.optiq/optiq-core

public Object toJdbcObject() {
 return new Date(getJdbcDate(DateTimeUtil.DEFAULT_ZONE));
}

代码示例来源:origin: org.apache.optiq/optiq-core

/**
 * Parses a string as a ZonelessDate with a given format string.
 *
 * @param s      a string representing a date in ISO format, i.e. according to
 *               the SimpleDateFormat string "yyyy-MM-dd"
 * @param format format string as per {@link SimpleDateFormat}
 * @return the parsed date, or null if parsing failed
 */
public static ZonelessDate parse(String s, String format) {
 Calendar cal =
   DateTimeUtil.parseDateFormat(
     s,
     format,
     DateTimeUtil.GMT_ZONE);
 if (cal == null) {
  return null;
 }
 ZonelessDate zd = new ZonelessDate();
 zd.setZonelessTime(cal.getTimeInMillis());
 return zd;
}

代码示例来源:origin: net.hydromatic/optiq

/**
 * Formats this ZonelessDate via a SimpleDateFormat
 *
 * @param format format string, as required by {@link SimpleDateFormat}
 *
 * @return the formatted date string
 */
public String toString(String format)
{
  DateFormat formatter = getFormatter(format);
  Date jdbcDate = getTempDate(getTime());
  return formatter.format(jdbcDate);
}

代码示例来源:origin: org.apache.optiq/optiq-core

/**
 * Parses a string as a ZonelessDate.
 *
 * @param s a string representing a date in ISO format, i.e. according to
 *          the SimpleDateFormat string "yyyy-MM-dd"
 * @return the parsed date, or null if parsing failed
 */
public static ZonelessDate parse(String s) {
 return parse(s, DateTimeUtil.DATE_FORMAT_STRING);
}

代码示例来源:origin: org.apache.optiq/optiq-core

break;
case DATE:
 printDatetime(pw, new ZonelessDate(), value);
 break;
case TIME:

代码示例来源:origin: net.hydromatic/optiq

public void setZonedTime(long value, TimeZone zone)
{
  super.setZonedTime(value, zone);
  clearTime();
}

代码示例来源:origin: net.hydromatic/optiq

/**
 * Parses a string as a ZonelessDate with a given format string.
 *
 * @param s a string representing a date in ISO format, i.e. according to
 * the SimpleDateFormat string "yyyy-MM-dd"
 * @param format format string as per {@link SimpleDateFormat}
 *
 * @return the parsed date, or null if parsing failed
 */
public static ZonelessDate parse(String s, String format)
{
  Calendar cal =
    DateTimeUtil.parseDateFormat(
      s,
      format,
      DateTimeUtil.gmtZone);
  if (cal == null) {
    return null;
  }
  ZonelessDate zd = new ZonelessDate();
  zd.setZonelessTime(cal.getTimeInMillis());
  return zd;
}

代码示例来源:origin: cascading/lingual-core

protected ZonelessDatetime parse( String value )
 {
 return ZonelessDate.parse( value );
 }

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com