org.eigenbase.util14.ZonelessDatetime.getTimeValue()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(96)

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

ZonelessDatetime.getTimeValue介绍

[英]Gets the time portion of this zoneless datetime.
[中]获取此无区域日期时间的时间部分。

代码示例

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

/**
 * Gets the date portion of this zoneless datetime.
 */
public long getDateValue() {
 return internalTime - getTimeValue();
}

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

/**
 * Clears the date component of this datetime
 */
public void clearDate()
{
  internalTime = getTimeValue();
}

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

/**
 * Clears the date component of this datetime
 */
public void clearDate() {
 internalTime = getTimeValue();
}

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

/**
 * Gets the date portion of this zoneless datetime.
 */
public long getDateValue()
{
  return internalTime - getTimeValue();
}

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

/**
 * Gets the value of this datetime as a milliseconds value for {@link
 * java.sql.Time}.
 *
 * @param zone time zone in which to generate a time value for
 */
public long getJdbcTime(TimeZone zone) {
 long timeValue = getTimeValue();
 return timeValue - zone.getOffset(timeValue);
}

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

/**
 * Gets the value of this datetime as a milliseconds value for {@link
 * java.sql.Time}.
 *
 * @param zone time zone in which to generate a time value for
 */
public long getJdbcTime(TimeZone zone)
{
  long timeValue = getTimeValue();
  return timeValue - zone.getOffset(timeValue);
}

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

@Override
public Object canonical( Object value )
 {
 if( value == null )
  return null;
 Class from = value.getClass();
 if( from == String.class )
  return (int) ( parse( (String) value ).getTimeValue() );
 if( Date.class.isAssignableFrom( from ) )
  return (int) ( ( (Date) value ).getTime() % MILLIS_PER_DAY ); // in UTC
 if( from == Integer.class || from == int.class )
  return value;
 if( from == Long.class || from == long.class )
  return ( (Long) value ).intValue();
 throw new CascadingException( "unknown type coercion requested from: " + Util.getTypeName( from ) );
 }

相关文章