JodaTime Duration

Overview Duration specifies a length of time in milliseconds. Refer to Duration on Joda-Time site for further details. Create Duration Perform Arithmetic Operations On Duration Convert Duration To Single Fields Periods like Days, Hours, Minutes and Seconds Create Duration Duration can be created using the following ways: Using two DateTime instances Using Millis From Days … Read more

JodaTime Instant

Overview An Instant represents a point in time independent of Chronology or TimeZone. Creating Instant Comparing Two Instants Get Sub-Fields of Instant Perform Arithmentic Operations On Instant like Addition, Subtraction and Repeated Addition Convert Instant To Other Representations Like DateTime, MutableDateTime,JDK Date and String Creating Instant Instant can be created in the following ways: Using … Read more

JodaTime Interval

Overview An Interval represents the period of time between two Instant s. Refer to Interval on Joda-Time site for further details. Construct An Interval Find Relationship Between Two Intervals (Gap, Adjoining, Overlap) Modify Interval Using Millis, Duration and Instant Construct An Interval Interval can be constructed in the following six ways: Using start and end … Read more

JodaTime DateTimeComparator

Overview This article describes the various ways to compare two DateTime instances. Compare DateTime Compare Two DateTime instances considering only Date fields and ignoring TIme fields Compare Two DateTime instances considering only Time fields and ignoring Date fields Using Upper and Lower Limits for DateTime comparison Compare DateTime Use DateTimeComparator.getInstance() to get a comparator for … Read more

JodaTime DateTimeFormat

Overview This article describes the various ways to format the of date and time using DateTimeFormat . Formatting Year Field Formatting Month Field Formatting Day Field Formatting Day Of Week Field Formatting Time Fields Using Formatting Styles: Short, Medium, Long, Full and Omit Define Styles Using Convenience Methods Custom Formatting of Date and Time Using … Read more

JodaTime DateTime

Overview DateTime is the most commonly class in Joda-Time to represent date and time. This article is a How-To guide on accessing the various features provided by DateTime as listed below: Instantiate DateTime Get DateTime for current instant Get sub-elements of DateTime (e.g. year, month, hours, etc.) Perform arithmetic operations on DateTime like addition and … Read more

JodaTime : DateTime Key Concepts

Table Of Contents Overview Date Concepts Calendar Date Day Year Week Century Of Era Era Epoch Time Concepts TimeZone UTC Offset Clock Convention Hour Of Day Minute Second Milli-Second Joda-Time Specific Concepts Overview Before plunging into the details of Joda-Time, it is important to clarify the key concepts related to date and time. This article … Read more

Java JodaTime

Overview Joda-Time is a popular open source API for date and time manipulation. Joda-Time is intuitive to use and is very elegantly designed. It has maps closely to the date-time domain concepts and has supports immutability. It has a wide variety of formatters which are thread safe. Support for TimeZones and multiple calendar systems is … Read more

Configuration Aalto StAX Parser For Speed

Overview Aalto provides various configuration options for efficient performance based on environment constraints. In this article, we shall see how to configure Aalto for speed assuming that memory is not a significant constraint. Create employee.xml as shown below. Create TestConfigureSpeed class as shown below. The configuration for speed is defined using XMLInputFactory2.configureForSpeed() (see line 17 … Read more