org.apache.jackrabbit.util.ISO8601.getYear()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(114)

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

ISO8601.getYear介绍

[英]Returns the astronomical year of the given calendar.
[中]返回给定日历的天文年。

代码示例

代码示例来源:origin: apache/jackrabbit

/**
 * Constructs a <code>DateValue</code> object representing a date.
 *
 * @param date the date this <code>DateValue</code> should represent
 * @throws IllegalArgumentException if the given date cannot be represented
 * as defined by ISO 8601.
 */
public DateValue(Calendar date) throws IllegalArgumentException {
  super(TYPE);
  this.date = date;
  ISO8601.getYear(date);
}

代码示例来源:origin: org.apache.jackrabbit/jackrabbit-jcr-commons

/**
 * Constructs a <code>DateValue</code> object representing a date.
 *
 * @param date the date this <code>DateValue</code> should represent
 * @throws IllegalArgumentException if the given date cannot be represented
 * as defined by ISO 8601.
 */
public DateValue(Calendar date) throws IllegalArgumentException {
  super(TYPE);
  this.date = date;
  ISO8601.getYear(date);
}

代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Constructs a <code>DateValue</code> object representing a date.
 *
 * @param date the date this <code>DateValue</code> should represent
 * @throws IllegalArgumentException if the given date cannot be represented
 * as defined by ISO 8601.
 */
public DateValue(Calendar date) throws IllegalArgumentException {
  super(TYPE);
  this.date = date;
  ISO8601.getYear(date);
}

代码示例来源:origin: apache/jackrabbit

/**
 * {@inheritDoc}
 */
public Value createValue(Calendar value) {
  try {
    ISO8601.getYear(value);
    QValue qvalue = qfactory.create(value);
    return new QValueValue(qvalue, resolver);
  } catch (RepositoryException ex) {
    throw new RuntimeException(ex);
  }
}

代码示例来源:origin: org.apache.jackrabbit/jackrabbit-spi-commons

/**
 * {@inheritDoc}
 */
public Value createValue(Calendar value) {
  try {
    ISO8601.getYear(value);
    QValue qvalue = qfactory.create(value);
    return new QValueValue(qvalue, resolver);
  } catch (RepositoryException ex) {
    throw new RuntimeException(ex);
  }
}

代码示例来源:origin: org.apache.jackrabbit/jackrabbit-jcr-commons

getYear(cal);
} catch (IllegalArgumentException e) {
  return null;

代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

getYear(cal);
} catch (IllegalArgumentException e) {
  return null;

代码示例来源:origin: apache/jackrabbit

getYear(cal);
} catch (IllegalArgumentException e) {
  return null;

代码示例来源:origin: org.apache.jackrabbit/jackrabbit-jcr-commons

appendZeroPaddedInt(buf, getYear(cal), 4);
buf.append('-');

代码示例来源:origin: apache/jackrabbit

appendZeroPaddedInt(buf, getYear(cal), 4);
buf.append('-');

代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

appendZeroPaddedInt(buf, getYear(cal), 4);
buf.append('-');

相关文章