gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-16 09:00:40 30 4
gpt4 key购买 nike

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

YearMonthDay.withPeriodAdded介绍

[英]Returns a copy of this date with the specified period added.

If the addition is zero, then this is returned. Fields in the period that aren't present in the partial are ignored.

This method is typically used to add multiple copies of complex period instances. Adding one field is best achieved using methods like #withFieldAdded(DurationFieldType,int)or #plusYears(int).
[中]

代码示例

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

/**
 * Returns a copy of this date with the specified period added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to add complex period instances.
 * Adding one field is best achieved using methods
 * like {@link #plusYears(int)}.
 * 
 * @param period  the duration to add to this one, null means zero
 * @return a copy of this instance with the period added
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay plus(ReadablePeriod period) {
  return withPeriodAdded(period, 1);
}

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

/**
 * Returns a copy of this date with the specified period taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to subtract complex period instances.
 * Subtracting one field is best achieved using methods
 * like {@link #minusYears(int)}.
 * 
 * @param period  the period to reduce this instant by
 * @return a copy of this instance with the period taken away
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay minus(ReadablePeriod period) {
  return withPeriodAdded(period, -1);
}

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

/**
 * Returns a copy of this date with the specified period added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to add complex period instances.
 * Adding one field is best achieved using methods
 * like {@link #plusYears(int)}.
 * 
 * @param period  the duration to add to this one, null means zero
 * @return a copy of this instance with the period added
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay plus(ReadablePeriod period) {
  return withPeriodAdded(period, 1);
}

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

/**
 * Returns a copy of this date with the specified period taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to subtract complex period instances.
 * Subtracting one field is best achieved using methods
 * like {@link #minusYears(int)}.
 * 
 * @param period  the period to reduce this instant by
 * @return a copy of this instance with the period taken away
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay minus(ReadablePeriod period) {
  return withPeriodAdded(period, -1);
}

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

/**
 * Returns a copy of this date with the specified period added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to add complex period instances.
 * Adding one field is best achieved using methods
 * like {@link #plusYears(int)}.
 * 
 * @param period  the duration to add to this one, null means zero
 * @return a copy of this instance with the period added
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay plus(ReadablePeriod period) {
  return withPeriodAdded(period, 1);
}

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

/**
 * Returns a copy of this date with the specified period taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to subtract complex period instances.
 * Subtracting one field is best achieved using methods
 * like {@link #minusYears(int)}.
 * 
 * @param period  the period to reduce this instant by
 * @return a copy of this instance with the period taken away
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay minus(ReadablePeriod period) {
  return withPeriodAdded(period, -1);
}

代码示例来源:origin: org.joda/com.springsource.org.joda.time

/**
 * Returns a copy of this date with the specified period taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to subtract complex period instances.
 * Subtracting one field is best achieved using methods
 * like {@link #minusYears(int)}.
 * 
 * @param period  the period to reduce this instant by
 * @return a copy of this instance with the period taken away
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay minus(ReadablePeriod period) {
  return withPeriodAdded(period, -1);
}

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

/**
 * Returns a copy of this date with the specified period taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to subtract complex period instances.
 * Subtracting one field is best achieved using methods
 * like {@link #minusYears(int)}.
 * 
 * @param period  the period to reduce this instant by
 * @return a copy of this instance with the period taken away
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay minus(ReadablePeriod period) {
  return withPeriodAdded(period, -1);
}

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

/**
 * Returns a copy of this date with the specified period taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to subtract complex period instances.
 * Subtracting one field is best achieved using methods
 * like {@link #minusYears(int)}.
 * 
 * @param period  the period to reduce this instant by
 * @return a copy of this instance with the period taken away
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay minus(ReadablePeriod period) {
  return withPeriodAdded(period, -1);
}

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

/**
 * Returns a copy of this date with the specified period taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to subtract complex period instances.
 * Subtracting one field is best achieved using methods
 * like {@link #minusYears(int)}.
 * 
 * @param period  the period to reduce this instant by
 * @return a copy of this instance with the period taken away
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay minus(ReadablePeriod period) {
  return withPeriodAdded(period, -1);
}

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

/**
 * Returns a copy of this date with the specified period taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to subtract complex period instances.
 * Subtracting one field is best achieved using methods
 * like {@link #minusYears(int)}.
 * 
 * @param period  the period to reduce this instant by
 * @return a copy of this instance with the period taken away
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay minus(ReadablePeriod period) {
  return withPeriodAdded(period, -1);
}

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

/**
 * Returns a copy of this date with the specified period added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to add complex period instances.
 * Adding one field is best achieved using methods
 * like {@link #plusYears(int)}.
 * 
 * @param period  the duration to add to this one, null means zero
 * @return a copy of this instance with the period added
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay plus(ReadablePeriod period) {
  return withPeriodAdded(period, 1);
}

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

/**
 * Returns a copy of this date with the specified period added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to add complex period instances.
 * Adding one field is best achieved using methods
 * like {@link #plusYears(int)}.
 * 
 * @param period  the duration to add to this one, null means zero
 * @return a copy of this instance with the period added
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay plus(ReadablePeriod period) {
  return withPeriodAdded(period, 1);
}

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

/**
 * Returns a copy of this date with the specified period taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to subtract complex period instances.
 * Subtracting one field is best achieved using methods
 * like {@link #minusYears(int)}.
 * 
 * @param period  the period to reduce this instant by
 * @return a copy of this instance with the period taken away
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay minus(ReadablePeriod period) {
  return withPeriodAdded(period, -1);
}

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

/**
 * Returns a copy of this date with the specified period added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to add complex period instances.
 * Adding one field is best achieved using methods
 * like {@link #plusYears(int)}.
 * 
 * @param period  the duration to add to this one, null means zero
 * @return a copy of this instance with the period added
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay plus(ReadablePeriod period) {
  return withPeriodAdded(period, 1);
}

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

/**
 * Returns a copy of this date with the specified period added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to add complex period instances.
 * Adding one field is best achieved using methods
 * like {@link #plusYears(int)}.
 * 
 * @param period  the duration to add to this one, null means zero
 * @return a copy of this instance with the period added
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay plus(ReadablePeriod period) {
  return withPeriodAdded(period, 1);
}

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

/**
 * Returns a copy of this date with the specified period added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to add complex period instances.
 * Adding one field is best achieved using methods
 * like {@link #plusYears(int)}.
 * 
 * @param period  the duration to add to this one, null means zero
 * @return a copy of this instance with the period added
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay plus(ReadablePeriod period) {
  return withPeriodAdded(period, 1);
}

代码示例来源:origin: org.joda/com.springsource.org.joda.time

/**
 * Returns a copy of this date with the specified period added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to add complex period instances.
 * Adding one field is best achieved using methods
 * like {@link #plusYears(int)}.
 * 
 * @param period  the duration to add to this one, null means zero
 * @return a copy of this instance with the period added
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay plus(ReadablePeriod period) {
  return withPeriodAdded(period, 1);
}

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

/**
 * Returns a copy of this date with the specified period taken away.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to subtract complex period instances.
 * Subtracting one field is best achieved using methods
 * like {@link #minusYears(int)}.
 * 
 * @param period  the period to reduce this instant by
 * @return a copy of this instance with the period taken away
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay minus(ReadablePeriod period) {
  return withPeriodAdded(period, -1);
}

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

/**
 * Returns a copy of this date with the specified period added.
 * <p>
 * If the amount is zero or null, then <code>this</code> is returned.
 * <p>
 * This method is typically used to add complex period instances.
 * Adding one field is best achieved using methods
 * like {@link #plusYears(int)}.
 * 
 * @param period  the duration to add to this one, null means zero
 * @return a copy of this instance with the period added
 * @throws ArithmeticException if the new datetime exceeds the capacity of a long
 */
public YearMonthDay plus(ReadablePeriod period) {
  return withPeriodAdded(period, 1);
}

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com