congrats Icon
New! Announcing our next generation AI code completions
Read here
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

  • Finding current android device location
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Permission (java.security)
    Legacy security code; do not use.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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