congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RemainderDateTimeField
Code IndexAdd Tabnine to your IDE (free)

How to use
RemainderDateTimeField
in
org.joda.time.field

Best Java code snippets using org.joda.time.field.RemainderDateTimeField (Showing top 20 results out of 315)

origin: stanfordnlp/CoreNLP

 public DateTimeField getField(Chronology chronology) {
  return new OffsetDateTimeField(new RemainderDateTimeField(new OffsetDateTimeField(chronology.monthOfYear(), -1), MonthOfHalfYear, 6), 1);
 }
};
origin: joda-time/joda-time

/**
 * Add the specified amount to the specified time instant, wrapping around
 * within the remainder range if necessary. The amount added may be
 * negative.
 * 
 * @param instant  the time instant in millis to update.
 * @param amount  the amount to add (can be negative).
 * @return the updated time instant.
 */
public long addWrapField(long instant, int amount) {
  return set(instant, FieldUtils.getWrappedValue(get(instant), amount, 0, iDivisor - 1));
}
origin: joda-time/joda-time

/**
 * Set the specified amount of remainder units to the specified time instant.
 * 
 * @param instant  the time instant in millis to update.
 * @param value  value of remainder units to set.
 * @return the updated time instant.
 * @throws IllegalArgumentException if value is too large or too small.
 */
public long set(long instant, int value) {
  FieldUtils.verifyValueBounds(this, value, 0, iDivisor - 1);
  int divided = getDivided(getWrappedField().get(instant));
  return getWrappedField().set(instant, divided * iDivisor + value);
}
origin: joda-time/joda-time

public long roundFloor(long instant) {
  return getWrappedField().roundFloor(instant);
}
origin: joda-time/joda-time

public long roundHalfFloor(long instant) {
  return getWrappedField().roundHalfFloor(instant);
}
origin: stanfordnlp/CoreNLP

 public DateTimeField getField(Chronology chronology) {
  return new OffsetDateTimeField(new RemainderDateTimeField(new OffsetDateTimeField(chronology.monthOfYear(), -1), MonthOfQuarter, 3), 1);
 }
};
origin: JodaOrg/joda-time

/**
 * Add the specified amount to the specified time instant, wrapping around
 * within the remainder range if necessary. The amount added may be
 * negative.
 * 
 * @param instant  the time instant in millis to update.
 * @param amount  the amount to add (can be negative).
 * @return the updated time instant.
 */
public long addWrapField(long instant, int amount) {
  return set(instant, FieldUtils.getWrappedValue(get(instant), amount, 0, iDivisor - 1));
}
origin: JodaOrg/joda-time

/**
 * Set the specified amount of remainder units to the specified time instant.
 * 
 * @param instant  the time instant in millis to update.
 * @param value  value of remainder units to set.
 * @return the updated time instant.
 * @throws IllegalArgumentException if value is too large or too small.
 */
public long set(long instant, int value) {
  FieldUtils.verifyValueBounds(this, value, 0, iDivisor - 1);
  int divided = getDivided(getWrappedField().get(instant));
  return getWrappedField().set(instant, divided * iDivisor + value);
}
origin: joda-time/joda-time

/**
 * Get the remainder from the specified time instant.
 * 
 * @param instant  the time instant in millis to query.
 * @return the remainder extracted from the input.
 */
public int get(long instant) {
  int value = getWrappedField().get(instant);
  if (value >= 0) {
    return value % iDivisor;
  } else {
    return (iDivisor - 1) + ((value + 1) % iDivisor);
  }
}
origin: stanfordnlp/CoreNLP

 public DateTimeField getField(Chronology chronology) {
  return new OffsetDateTimeField(new RemainderDateTimeField(new OffsetDateTimeField(chronology.weekOfWeekyear(), -1), WeekOfMonth, 4), 1);
 }
};
origin: camunda/camunda-bpm-platform

/**
 * Add the specified amount to the specified time instant, wrapping around
 * within the remainder range if necessary. The amount added may be
 * negative.
 * 
 * @param instant  the time instant in millis to update.
 * @param amount  the amount to add (can be negative).
 * @return the updated time instant.
 */
public long addWrapField(long instant, int amount) {
  return set(instant, FieldUtils.getWrappedValue(get(instant), amount, 0, iDivisor - 1));
}
origin: camunda/camunda-bpm-platform

/**
 * Set the specified amount of remainder units to the specified time instant.
 * 
 * @param instant  the time instant in millis to update.
 * @param value  value of remainder units to set.
 * @return the updated time instant.
 * @throws IllegalArgumentException if value is too large or too small.
 */
public long set(long instant, int value) {
  FieldUtils.verifyValueBounds(this, value, 0, iDivisor - 1);
  int divided = getDivided(getWrappedField().get(instant));
  return getWrappedField().set(instant, divided * iDivisor + value);
}
origin: joda-time/joda-time

public long roundCeiling(long instant) {
  return getWrappedField().roundCeiling(instant);
}
origin: joda-time/joda-time

protected void assemble(Fields fields) {
  if (getBase().getZone() == DateTimeZone.UTC) {
    // Use zero based century and year of century.
    fields.centuryOfEra = new DividedDateTimeField(
      ISOYearOfEraDateTimeField.INSTANCE, DateTimeFieldType.centuryOfEra(), 100);
    fields.centuries = fields.centuryOfEra.getDurationField();
    
    fields.yearOfCentury = new RemainderDateTimeField(
      (DividedDateTimeField) fields.centuryOfEra, DateTimeFieldType.yearOfCentury());
    fields.weekyearOfCentury = new RemainderDateTimeField(
      (DividedDateTimeField) fields.centuryOfEra, fields.weekyears, DateTimeFieldType.weekyearOfCentury());
  }
}
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/**
 * Add the specified amount to the specified time instant, wrapping around
 * within the remainder range if necessary. The amount added may be
 * negative.
 * 
 * @param instant  the time instant in millis to update.
 * @param amount  the amount to add (can be negative).
 * @return the updated time instant.
 */
public long addWrapField(long instant, int amount) {
  return set(instant, FieldUtils.getWrappedValue(get(instant), amount, 0, iDivisor - 1));
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time

/**
 * Set the specified amount of remainder units to the specified time instant.
 * 
 * @param instant  the time instant in millis to update.
 * @param value  value of remainder units to set.
 * @return the updated time instant.
 * @throws IllegalArgumentException if value is too large or too small.
 */
public long set(long instant, int value) {
  FieldUtils.verifyValueBounds(this, value, 0, iDivisor - 1);
  int divided = getDivided(getWrappedField().get(instant));
  return getWrappedField().set(instant, divided * iDivisor + value);
}
origin: joda-time/joda-time

public long roundHalfEven(long instant) {
  return getWrappedField().roundHalfEven(instant);
}
origin: JodaOrg/joda-time

protected void assemble(Fields fields) {
  if (getBase().getZone() == DateTimeZone.UTC) {
    // Use zero based century and year of century.
    fields.centuryOfEra = new DividedDateTimeField(
      ISOYearOfEraDateTimeField.INSTANCE, DateTimeFieldType.centuryOfEra(), 100);
    fields.centuries = fields.centuryOfEra.getDurationField();
    
    fields.yearOfCentury = new RemainderDateTimeField(
      (DividedDateTimeField) fields.centuryOfEra, DateTimeFieldType.yearOfCentury());
    fields.weekyearOfCentury = new RemainderDateTimeField(
      (DividedDateTimeField) fields.centuryOfEra, fields.weekyears, DateTimeFieldType.weekyearOfCentury());
  }
}
origin: org.joda/com.springsource.org.joda.time

/**
 * Add the specified amount to the specified time instant, wrapping around
 * within the remainder range if necessary. The amount added may be
 * negative.
 * 
 * @param instant  the time instant in millis to update.
 * @param amount  the amount to add (can be negative).
 * @return the updated time instant.
 */
public long addWrapField(long instant, int amount) {
  return set(instant, FieldUtils.getWrappedValue(get(instant), amount, 0, iDivisor - 1));
}
origin: org.joda/com.springsource.org.joda.time

/**
 * Set the specified amount of remainder units to the specified time instant.
 * 
 * @param instant  the time instant in millis to update.
 * @param value  value of remainder units to set.
 * @return the updated time instant.
 * @throws IllegalArgumentException if value is too large or too small.
 */
public long set(long instant, int value) {
  FieldUtils.verifyValueBounds(this, value, 0, iDivisor - 1);
  int divided = getDivided(getWrappedField().get(instant));
  return getWrappedField().set(instant, divided * iDivisor + value);
}
org.joda.time.fieldRemainderDateTimeField

Javadoc

Counterpart remainder datetime field to DividedDateTimeField. The field's unit duration is unchanged, but the range duration is scaled accordingly.

RemainderDateTimeField is thread-safe and immutable.

Most used methods

  • <init>
    Construct a RemainderDateTimeField that compliments the given DividedDateTimeField. This constructor
  • get
    Get the remainder from the specified time instant.
  • getDivided
  • getWrappedField
  • set
    Set the specified amount of remainder units to the specified time instant.

Popular in Java

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now