org.geotools.feature.type.DateUtil.serializeYearMonth()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(207)

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

DateUtil.serializeYearMonth介绍

[英]Serialize time to general gYearMonth text. Date values are formatted in W3C XML Schema standard format as CCYY-MM, with optional leading sign included if necessary.
[中]将时间序列化为常规gYearMonth文本。日期值的格式为W3C XML模式标准格式CCYY-MM,必要时还包括可选的前导符号。

代码示例

代码示例来源:origin: geotools/geotools

/**
 * Serialize date to general gYearMonth text. Date values are formatted in W3C XML Schema
 * standard format as CCYY-MM, with optional leading sign included if necessary.
 *
 * @param date date to be converted
 * @return converted gYearMonth text
 * @throws IllegalArgumentException on conversion error
 */
public static String serializeYearMonth(Date date) throws IllegalArgumentException {
  return serializeYearMonth(date.getTime());
}

代码示例来源:origin: org.geotools/gt-main

/**
 * Serialize date to general gYearMonth text. Date values are formatted in
 * W3C XML Schema standard format as CCYY-MM, with optional leading sign
 * included if necessary.
 *
 * @param date date to be converted
 *
 * @return converted gYearMonth text
 *
 * @throws IllegalArgumentException on conversion error
 */
public static String serializeYearMonth(Date date)
  throws IllegalArgumentException {
  return serializeYearMonth(date.getTime());
}

代码示例来源:origin: org.geotools/gt2-main

/**
 * Serialize date to general gYearMonth text. Date values are formatted in
 * W3C XML Schema standard format as CCYY-MM, with optional leading sign
 * included if necessary.
 *
 * @param date date to be converted
 *
 * @return converted gYearMonth text
 *
 * @throws IllegalArgumentException on conversion error
 */
public static String serializeYearMonth(Date date)
  throws IllegalArgumentException {
  return serializeYearMonth(date.getTime());
}

相关文章