src/share/classes/java/time/format/package-info.java

Print this page




  51  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  52  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  53  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  54  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  55  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  56  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  57  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  58  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  59  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  60  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  61  */
  62 
  63 /**
  64  * <p>
  65  * Provides classes to print and parse dates and times.
  66  * </p>
  67  * <p>
  68  * Printing and parsing is based around the
  69  * {@link java.time.format.DateTimeFormatter DateTimeFormatter} class.
  70  * Instances are generally obtained from
  71  * {@link java.time.format.DateTimeFormatters DateTimeFormatters}, however
  72  * {@link java.time.format.DateTimeFormatterBuilder DateTimeFormatterBuilder}
  73  * can be used if more power is needed.
  74  * </p>
  75  * <p>
  76  * Localization occurs by calling
  77  * {@link java.time.format.DateTimeFormatter#withLocale(java.util.Locale) withLocale(Locale)}
  78  * on the formatter. Further customization is possible using
  79  * {@link java.time.format.DateTimeFormatSymbols DateTimeFormatSymbols}.
  80  * </p>
  81  *
  82  * <h3>Package specification</h3>
  83  * <p>
  84  * Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
  85  * in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
  86  * The Javadoc "@param" definition is used to summarise the null-behavior.
  87  * The "@throws {@link java.lang.NullPointerException}" is not explicitly documented in each method.
  88  * </p>
  89  * <p>
  90  * All calculations should check for numeric overflow and throw either an {@link java.lang.ArithmeticException}
  91  * or a {@link java.time.DateTimeException}.


  51  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  52  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  53  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  54  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  55  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  56  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  57  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  58  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  59  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  60  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  61  */
  62 
  63 /**
  64  * <p>
  65  * Provides classes to print and parse dates and times.
  66  * </p>
  67  * <p>
  68  * Printing and parsing is based around the
  69  * {@link java.time.format.DateTimeFormatter DateTimeFormatter} class.
  70  * Instances are generally obtained from
  71  * {@link java.time.format.DateTimeFormatter DateTimeFormatter}, however
  72  * {@link java.time.format.DateTimeFormatterBuilder DateTimeFormatterBuilder}
  73  * can be used if more power is needed.
  74  * </p>
  75  * <p>
  76  * Localization occurs by calling
  77  * {@link java.time.format.DateTimeFormatter#withLocale(java.util.Locale) withLocale(Locale)}
  78  * on the formatter. Further customization is possible using
  79  * {@link java.time.format.DateTimeFormatSymbols DateTimeFormatSymbols}.
  80  * </p>
  81  *
  82  * <h3>Package specification</h3>
  83  * <p>
  84  * Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
  85  * in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
  86  * The Javadoc "@param" definition is used to summarise the null-behavior.
  87  * The "@throws {@link java.lang.NullPointerException}" is not explicitly documented in each method.
  88  * </p>
  89  * <p>
  90  * All calculations should check for numeric overflow and throw either an {@link java.lang.ArithmeticException}
  91  * or a {@link java.time.DateTimeException}.