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

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

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

YearMonth.toString介绍

[英]Output the year-month in ISO8601 format (yyyy-MM).
[中]以ISO8601格式(yyyy-MM)输出年-月。

代码示例

代码示例来源:origin: spring-projects/spring-framework

  1. @Override
  2. public String print(YearMonth object, Locale locale) {
  3. return object.toString();
  4. }

代码示例来源:origin: org.springframework/spring-context

  1. @Override
  2. public String print(YearMonth object, Locale locale) {
  3. return object.toString();
  4. }

代码示例来源:origin: JodaOrg/joda-time

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @see org.joda.time.format.DateTimeFormat
  6. */
  7. public String toString(String pattern) {
  8. if (pattern == null) {
  9. return toString();
  10. }
  11. return DateTimeFormat.forPattern(pattern).print(this);
  12. }

代码示例来源:origin: joda-time/joda-time

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @see org.joda.time.format.DateTimeFormat
  6. */
  7. public String toString(String pattern) {
  8. if (pattern == null) {
  9. return toString();
  10. }
  11. return DateTimeFormat.forPattern(pattern).print(this);
  12. }

代码示例来源:origin: joda-time/joda-time

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @param locale Locale to use, null means default
  6. * @see org.joda.time.format.DateTimeFormat
  7. */
  8. public String toString(String pattern, Locale locale) throws IllegalArgumentException {
  9. if (pattern == null) {
  10. return toString();
  11. }
  12. return DateTimeFormat.forPattern(pattern).withLocale(locale).print(this);
  13. }

代码示例来源:origin: JodaOrg/joda-time

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @param locale Locale to use, null means default
  6. * @see org.joda.time.format.DateTimeFormat
  7. */
  8. public String toString(String pattern, Locale locale) throws IllegalArgumentException {
  9. if (pattern == null) {
  10. return toString();
  11. }
  12. return DateTimeFormat.forPattern(pattern).withLocale(locale).print(this);
  13. }

代码示例来源:origin: camunda/camunda-bpm-platform

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @see org.joda.time.format.DateTimeFormat
  6. */
  7. public String toString(String pattern) {
  8. if (pattern == null) {
  9. return toString();
  10. }
  11. return DateTimeFormat.forPattern(pattern).print(this);
  12. }

代码示例来源:origin: camunda/camunda-bpm-platform

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @param locale Locale to use, null means default
  6. * @see org.joda.time.format.DateTimeFormat
  7. */
  8. public String toString(String pattern, Locale locale) throws IllegalArgumentException {
  9. if (pattern == null) {
  10. return toString();
  11. }
  12. return DateTimeFormat.forPattern(pattern).withLocale(locale).print(this);
  13. }

代码示例来源:origin: org.jadira.usertype/usertype.core

  1. @Override
  2. public String toNonNullValue(YearMonth value) {
  3. return value.toString();
  4. }
  5. }

代码示例来源:origin: redfish64/TinyTravelTracker

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @see org.joda.time.format.DateTimeFormat
  6. */
  7. public String toString(String pattern) {
  8. if (pattern == null) {
  9. return toString();
  10. }
  11. return DateTimeFormat.forPattern(pattern).print(this);
  12. }

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @see org.joda.time.format.DateTimeFormat
  6. */
  7. public String toString(String pattern) {
  8. if (pattern == null) {
  9. return toString();
  10. }
  11. return DateTimeFormat.forPattern(pattern).print(this);
  12. }

代码示例来源:origin: io.virtdata/virtdata-lib-realer

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @see org.joda.time.format.DateTimeFormat
  6. */
  7. public String toString(String pattern) {
  8. if (pattern == null) {
  9. return toString();
  10. }
  11. return DateTimeFormat.forPattern(pattern).print(this);
  12. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @see org.joda.time.format.DateTimeFormat
  6. */
  7. public String toString(String pattern) {
  8. if (pattern == null) {
  9. return toString();
  10. }
  11. return DateTimeFormat.forPattern(pattern).print(this);
  12. }

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @see org.joda.time.format.DateTimeFormat
  6. */
  7. public String toString(String pattern) {
  8. if (pattern == null) {
  9. return toString();
  10. }
  11. return DateTimeFormat.forPattern(pattern).print(this);
  12. }

代码示例来源:origin: Nextdoor/bender

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @see org.joda.time.format.DateTimeFormat
  6. */
  7. public String toString(String pattern) {
  8. if (pattern == null) {
  9. return toString();
  10. }
  11. return DateTimeFormat.forPattern(pattern).print(this);
  12. }

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @see org.joda.time.format.DateTimeFormat
  6. */
  7. public String toString(String pattern) {
  8. if (pattern == null) {
  9. return toString();
  10. }
  11. return DateTimeFormat.forPattern(pattern).print(this);
  12. }

代码示例来源:origin: io.virtdata/virtdata-lib-realer

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @param locale Locale to use, null means default
  6. * @see org.joda.time.format.DateTimeFormat
  7. */
  8. public String toString(String pattern, Locale locale) throws IllegalArgumentException {
  9. if (pattern == null) {
  10. return toString();
  11. }
  12. return DateTimeFormat.forPattern(pattern).withLocale(locale).print(this);
  13. }

代码示例来源:origin: Nextdoor/bender

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @param locale Locale to use, null means default
  6. * @see org.joda.time.format.DateTimeFormat
  7. */
  8. public String toString(String pattern, Locale locale) throws IllegalArgumentException {
  9. if (pattern == null) {
  10. return toString();
  11. }
  12. return DateTimeFormat.forPattern(pattern).withLocale(locale).print(this);
  13. }

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

  1. /**
  2. * Output the year-month using the specified format pattern.
  3. *
  4. * @param pattern the pattern specification, null means use <code>toString</code>
  5. * @param locale Locale to use, null means default
  6. * @see org.joda.time.format.DateTimeFormat
  7. */
  8. public String toString(String pattern, Locale locale) throws IllegalArgumentException {
  9. if (pattern == null) {
  10. return toString();
  11. }
  12. return DateTimeFormat.forPattern(pattern).withLocale(locale).print(this);
  13. }

代码示例来源:origin: pl.edu.icm.synat/synat-console-core

  1. private void generateTableHeadersRow(Sheet reportSheet, int rowNum, ReportType type, ReportAggregation aggregation, Date intervalFrom, Date intervalTo) {
  2. CellStyle cellStyle = createBorderedBoldBlueStyle(reportSheet.getWorkbook(), BLUE_BOLD_BORDERED);
  3. int columns = getReportBaseColumnsCount(type, aggregation);
  4. Row row = generateRow(reportSheet, rowNum, columns, cellStyle, type, aggregation);
  5. int cellNum = row.getLastCellNum();
  6. List<YearMonth> months = getMonths(intervalFrom, intervalTo);
  7. for (YearMonth month : months) {
  8. createCell(cellNum++, row, cellStyle, month.toString(MONTH_PATTERN));
  9. }
  10. }

相关文章