org.joda.time.DateTime.getCenturyOfEra()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(191)

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

DateTime.getCenturyOfEra介绍

暂无

代码示例

代码示例来源:origin: org.modeshape/modeshape-graph

/**
 * {@inheritDoc}
 */
public int getCenturyOfEra() {
  return this.instance.getCenturyOfEra();
}

代码示例来源:origin: org.alfresco/alfresco-repository

if (dateTime.getCenturyOfEra() > 0)
if (dateTime.getCenturyOfEra() > 0)

代码示例来源:origin: Alfresco/alfresco-repository

if (dateTime.getCenturyOfEra() > 0)
if (dateTime.getCenturyOfEra() > 0)

代码示例来源:origin: org.n52.sensorweb.sos/coding-uvf

private void writeLine2(FileWriter fw, OmObservation o, TimePeriod centuries, String lineEnding) throws IOException {
  // 2.Zeile ABFLUSS m3/s 1900 1900
  StringBuilder sb = new StringBuilder(39);
  // Identifier
  AbstractPhenomenon observableProperty = o.getObservationConstellation().getObservableProperty();
  String observablePropertyIdentifier = observableProperty.getIdentifier();
  if (observablePropertyIdentifier != null && !observablePropertyIdentifier.isEmpty()) {
    observablePropertyIdentifier = ensureIdentifierLength(observablePropertyIdentifier,
        UVFConstants.MAX_IDENTIFIER_LENGTH);
  }
  sb.append(observablePropertyIdentifier);
  fillWithSpaces(sb, UVFConstants.MAX_IDENTIFIER_LENGTH);
  // Unit (optional)
  String unit = getUnit(o);
  if (unit != null && !unit.isEmpty()) {
    unit = ensureIdentifierLength(unit,
      UVFConstants.MAX_IDENTIFIER_LENGTH);
    sb.append(" ");
    sb.append(unit);
  }
  fillWithSpaces(sb, 30);
  // Centuries
  sb.append(centuries.getStart().getCenturyOfEra() + "00 " + centuries.getEnd().getCenturyOfEra() + "00");
  writeToFile(fw, sb.toString(), lineEnding);
}

代码示例来源:origin: org.n52.arctic-sea/svalbard

private void writeLine2(Writer fw, OmObservation o, TimePeriod centuries, String lineEnding)
    throws IOException {
  // 2.Zeile ABFLUSS m3/s 1900 1900
  StringBuilder sb = new StringBuilder(39);
  // Identifier
  AbstractPhenomenon observableProperty = o.getObservationConstellation().getObservableProperty();
  String observablePropertyIdentifier = observableProperty.getIdentifier();
  if (observablePropertyIdentifier != null && !observablePropertyIdentifier.isEmpty()) {
    observablePropertyIdentifier =
        ensureIdentifierLength(observablePropertyIdentifier, UVFConstants.MAX_IDENTIFIER_LENGTH);
  }
  sb.append(observablePropertyIdentifier);
  fillWithSpaces(sb, UVFConstants.MAX_IDENTIFIER_LENGTH);
  // Unit (optional)
  String unit = getUnit(o);
  if (unit != null && !unit.isEmpty()) {
    unit = ensureIdentifierLength(unit, UVFConstants.MAX_IDENTIFIER_LENGTH);
    sb.append(" ");
    sb.append(unit);
  }
  fillWithSpaces(sb, 30);
  // Centuries
  sb.append(centuries.getStart().getCenturyOfEra() + "00 " + centuries.getEnd().getCenturyOfEra() + "00");
  writeToFile(fw, sb.toString(), lineEnding);
}

代码示例来源:origin: org.n52.svalbard/svalbard

private void writeLine2(Writer fw, OmObservation o, TimePeriod centuries, MediaType contentType)
    throws IOException {
  // 2.Zeile ABFLUSS m3/s 1900 1900
  StringBuilder sb = new StringBuilder(39);
  // Identifier
  AbstractPhenomenon observableProperty = o.getObservationConstellation().getObservableProperty();
  String observablePropertyIdentifier = observableProperty.getIdentifier();
  if (observablePropertyIdentifier != null && !observablePropertyIdentifier.isEmpty()) {
    observablePropertyIdentifier =
        ensureIdentifierLength(observablePropertyIdentifier, UVFConstants.MAX_IDENTIFIER_LENGTH);
  }
  sb.append(observablePropertyIdentifier);
  fillWithSpaces(sb, UVFConstants.MAX_IDENTIFIER_LENGTH);
  // Unit (optional)
  String unit = getUnit(o);
  if (unit != null && !unit.isEmpty()) {
    unit = ensureIdentifierLength(unit, UVFConstants.MAX_IDENTIFIER_LENGTH);
    sb.append(" ");
    sb.append(unit);
  }
  fillWithSpaces(sb, 30);
  // Centuries
  sb.append(centuries.getStart().getCenturyOfEra() + "00 " + centuries.getEnd().getCenturyOfEra() + "00");
  writeToFile(fw, sb.toString(), contentType);
}

代码示例来源:origin: CogComp/cogcomp-nlp

start = new DateTime(year, 1, 1, 0, 0, 0, 0);
finish = new DateTime(year + 99, 12, 31, 23, 59, 59, 59);
tc.addAttribute(TimexNames.value, String.valueOf(finish.getCenturyOfEra()));
return tc;
int anchorCentury = start.getCenturyOfEra();
String val = String.valueOf(anchorCentury*10+temp1);
tc.addAttribute(TimexNames.value, String.valueOf(val));
int anchorCentury = start.getCenturyOfEra();
String val = String.valueOf(anchorCentury*100+temp1);
tc.addAttribute(TimexNames.value, String.valueOf(val));
  year = start.getCenturyOfEra();
  year = year * 100 + Integer.parseInt(temp1);
  if (modiword == 0) {

代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-time

start = new DateTime(year, 1, 1, 0, 0, 0, 0);
finish = new DateTime(year + 99, 12, 31, 23, 59, 59, 59);
tc.addAttribute(TimexNames.value, String.valueOf(finish.getCenturyOfEra()));
return tc;
int anchorCentury = start.getCenturyOfEra();
String val = String.valueOf(anchorCentury*10+temp1);
tc.addAttribute(TimexNames.value, String.valueOf(val));
int anchorCentury = start.getCenturyOfEra();
String val = String.valueOf(anchorCentury*100+temp1);
tc.addAttribute(TimexNames.value, String.valueOf(val));
  year = start.getCenturyOfEra();
  year = year * 100 + Integer.parseInt(temp1);
  if (modiword == 0) {

代码示例来源:origin: CogComp/cogcomp-nlp

finish = new DateTime(year, 12, 31, 23, 59, 59, 59);
tc.addAttribute(TimexNames.type, TimexNames.DATE);
tc.addAttribute(TimexNames.value, String.valueOf(finish.getCenturyOfEra()));
return tc;

代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-time

finish = new DateTime(year, 12, 31, 23, 59, 59, 59);
tc.addAttribute(TimexNames.type, TimexNames.DATE);
tc.addAttribute(TimexNames.value, String.valueOf(finish.getCenturyOfEra()));
return tc;

代码示例来源:origin: CogComp/cogcomp-nlp

year = finish.getCenturyOfEra();
year = year * 100;
start = new DateTime(year, 1, 1, 0, 0, 0, 0);
finish = new DateTime(year + 99, 12, 31, 23, 59, 59, 59);
tc.addAttribute(TimexNames.type, TimexNames.DATE);
tc.addAttribute(TimexNames.value, String.valueOf(finish.getCenturyOfEra()));
return tc;
year = finish.getCenturyOfEra();
year = year * 100;
start = new DateTime(year, 1, 1, 0, 0, 0, 0);
finish = new DateTime(year + 9, 12, 31, 23, 59, 59, 59);
tc.addAttribute(TimexNames.type, TimexNames.DATE);
tc.addAttribute(TimexNames.value, String.valueOf(finish.getCenturyOfEra()*10));
return tc;
year = start.getCenturyOfEra();
year = year * 100;
start = new DateTime(year, 1, 1, 0, 0, 0, 0);
finish = new DateTime(year + 20, 12, 31, 23, 59, 59, 59);
tc.addAttribute(TimexNames.type, TimexNames.DATE);
tc.addAttribute(TimexNames.value, String.valueOf(finish.getCenturyOfEra()));
return tc;
year = start.getCenturyOfEra();
year = year * 100;
start = new DateTime(year, 1, 1, 0, 0, 0, 0);
tc.addAttribute(TimexNames.value, String.valueOf(finish.getCenturyOfEra()*10));

代码示例来源:origin: Alfresco/alfresco-repository

assertEquals(context, centuryOfEra, dateTime.getCenturyOfEra());

代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-time

year = finish.getCenturyOfEra();
year = year * 100;
start = new DateTime(year, 1, 1, 0, 0, 0, 0);
finish = new DateTime(year + 99, 12, 31, 23, 59, 59, 59);
tc.addAttribute(TimexNames.type, TimexNames.DATE);
tc.addAttribute(TimexNames.value, String.valueOf(finish.getCenturyOfEra()));
return tc;
year = finish.getCenturyOfEra();
year = year * 100;
start = new DateTime(year, 1, 1, 0, 0, 0, 0);
finish = new DateTime(year + 9, 12, 31, 23, 59, 59, 59);
tc.addAttribute(TimexNames.type, TimexNames.DATE);
tc.addAttribute(TimexNames.value, String.valueOf(finish.getCenturyOfEra()*10));
return tc;
year = start.getCenturyOfEra();
year = year * 100;
start = new DateTime(year, 1, 1, 0, 0, 0, 0);
finish = new DateTime(year + 20, 12, 31, 23, 59, 59, 59);
tc.addAttribute(TimexNames.type, TimexNames.DATE);
tc.addAttribute(TimexNames.value, String.valueOf(finish.getCenturyOfEra()));
return tc;
year = start.getCenturyOfEra();
year = year * 100;
start = new DateTime(year, 1, 1, 0, 0, 0, 0);
tc.addAttribute(TimexNames.value, String.valueOf(finish.getCenturyOfEra()*10));

相关文章

DateTime类方法