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

SAX Extensions Using Aalto

Overview As the name suggests, SAX extensions are an extension to the parsing capabilities of a SAX parser. SAX extensions provide additional capabilities to parse comments, DTD element, CData sections, etc. Additionally, there are several feature related flags (e.g. is-standalone , resolve-dtd-uris , etc.) which can be set. Please refer to the package summary for … Read more

SAX Parsing Using Aalto

Overview SAX parsing is an efficient way to parse XML documents. Unlike DOM (Document Object Model) based parsers, SAX parsers do not load the XML document in memory. SAX parsers use callback methods to let the calling code know about XML related structure. The key interfaces/classes are involved in SAX parsing are listed below: SAXParserFactory: … Read more