biweekly Changelog

What's new in biweekly 0.4.4

Jan 7, 2024
  • Fixed an issue where biweekly would consume multiple whitespace characters when reading a folded line under certain circumstances. This was in conflict with the specifications, which state that folded lines must begin with only one whitespace character (see Ticket 12).
  • Fixed problem with outputting dates without time components (see Ticket 13).
  • Added the ability to specify the XML version when writing xCals. Note that most JDKs only support version 1.0 natively, so you'll need to include a library like xalan if you want XML 1.1 support.
  • Added the ability to specify your own, custom JAXP output properties when writing xCals.
  • Made the parsing of folded, quoted-printable properties more robust by refactoring the way biweekly parses input.

New in biweekly 0.4.2 (May 8, 2015)

  • Fixed a bug where RECURRENCE-ID properties with timezones were not being parsed properly
  • Updated jackson dependency (for jCard parsing) to latest version.

New in biweekly 0.4.1 (Jan 20, 2015)

  • Fixed a bug with the RecurrenceProperty.getDateIterator() method that caused dates to be returned in the wrong timezone.

New in biweekly 0.4.0 (Dec 3, 2014)

  • Added much improved time zone support:
  • Date-time values are now parsed according to the VTIMEZONE components in the iCalendar object. Before, the VTIMEZONE components were ignored and the date-time value would be parsed according to the TZID parameter value (it was assumed that the TZID would be an Olsen timezone ID).
  • All timezone information is now stored in a TimezoneInfo object:
  • VTIMEZONE components are removed from the parsed ICalendar object and stored in the TimezoneInfo object.
  • To set the default time zone that all date-time values are formatted in, call ICalWriter.getTimezoneInfo().setDefaultTimeZone().
  • Introduced a new ICalDate object, which is now used in most date/time property values. This class extends java.util.Date and has a hasTime field, which flags the object as either a "date/time" or "date" value. This means that methods like DateStart.hasTime() have been removed, since this information is now stored in the property's ICalDate object.
  • Added support for the older vCalendar standard:
  • vCalendar files are automatically converted to the newer iCalendar data model.
  • ICalendar objects can be written according to either the old vCalendar standard or the new iCalendar standard.
  • RecurrenceDates property class: If a parsed RDATE property only contains periods, then RecurrenceDates.getDates() will be empty (instead of null). Similarly, if the property only contains dates, then RecurrenceDates.getPeriods() will be empty (instead of null).
  • Added a getDateIterator() method to the RecurrenceRule and ExceptionRule property classes. This allows you to iterate over all of the dates as defined by the recurrence rule.
  • Added optional dependency definitions to the OSGi bundle settings.

New in biweekly 0.3.3 (Jun 2, 2014)

  • dded a streaming API for xCals (XCalReader, XCalWriter).
  • Fixed a bug where property values in xCal documents weren't being parsed correctly.
  • Removed a regular expression used in parsing code to improve performance.
  • Renamed all "marshaller" classes to "scribes" (e.g. renamed "DescriptionMarshaller" to "DescriptionScribe"). Also moved the marshaller classes from "biweekly.(property/component).marshaller" to "biweekly.io.scribe.(property/component)".
  • Writer classes now check to make sure a scribe class exists for each property before writing anything to the output stream.
  • Improved unit test coverage.
  • Upgraded jackson dependency from version 2.1.3 to 2.3.3.

New in biweekly 0.3.2 (Apr 4, 2014)

  • Added OSGi support.
  • Added validation and parser warnings to a resource bundle for internationalization.
  • Fixed a bug that prevented large plain-text iCalendar streams from being read (see: discussion, credit: Jordy)
  • When writing plain-text and JSON-encoded iCalendar objects with the Biweekly class, the stream is now flushed after every iCalendar object is written (see Ticket 4, credit: Romain Gonord).

New in biweekly 0.3.1 (Apr 4, 2014)

  • Improved UTF-8 support: UTF-8 encoding is now used essentially whenever a File or InputStream/OutputStream object is passed into one of biweekly's reader/writer classes. Java Reader/Writer objects are not effected by this change because they are configured to use their own character encoding.
  • If a File or OutputStream object is passed into a writer class, UTF-8 encoding will be used.
  • If a File or InputStream object is passed into a plain-text iCal or jCal reader, UTF-8 encoding will be used.
  • If a File or InputStream object is passed into a xCal reader, the "encoding" attribute in the header portion of the XML document will be properly taken into account. Before, it was ignored and the document was parsed according to the JVM's default character encoding.
  • Added support for the EXRULE property.
  • RRULE now supports non-standard rule parts.
  • "Duration" class improvements: Added the following methods to the Duration class (credit: Caruyer Perrine):
  • toMillis() - Converts the duration to milliseconds
  • add(Date) - Adds the duration to a Date object
  • diff(Date, Date) - Factory method that builds a Duration from the difference between two Dates
  • fromMillis(long) - Factory method that builds a Duration from a milliseconds value
  • Other changes:
  • Added the ability to append onto existing files when writing plain-text files with the Biweekly class.
  • The Biweekly.parse(File) methods no longer throw a FileNotFoundException.
  • The ICalParameter.getRsvp() method now throws an IllegalStateException when the RSVP parameter value cannot be parsed (i.e. if it's something other than "true" or "false"). Before, it would return "null", which was misleading ("null" typically means that the parameter does not exist). Raw parameter values can still be retrieved using the get() method.
  • A CannotParseException is now consistently thrown during the parsing of xCal properties when the XML element which holds the property's value cannot be found.
  • When marshalling to xCard, if a property's value is null (a rare occurrence), then an empty XML element will be written (before, no element was written). This increases conformance with the xCard schema.
  • Created the ICalMarshallerRegistrar class, which can be used to assign a set of custom marshallers to a reader or writer class.
  • Improved the performance of plain-text iCal marshalling by optimizing string escaping functions.
  • Changed JCalValue.asStructured() and JCalValue.structured() so they properly support multi-valued structured components.
  • Renamed the "Value" class to "ICalDataType" and improved data type abstraction in the data model.
  • Moved ValidationWarnings class from the biweekly.component package to the biweekly package.
  • Renamed the following methods:
  • ICalPropertyMarshaller.Result.getValue --> getProperty
  • ICalPropertyMarshaller.getDataType --> dataType
  • JCalValue.getSingleValued --> asSingle
  • JCalValue.getMultivalued --> asMulti
  • JCalValue.getStructured --> asStructured
  • Added syntax highlighting to the code samples in the Javadocs.

New in biweekly 0.3.0 (Apr 4, 2014)

  • Added jCal support (JSON-encoded iCalendar objects).
  • Removed the "commons-codec" dependency.
  • Fixed a bug that prevented non-standard parameter values from being parsed.
  • Fixed a bug that prevented an iCalendar object from being parsed if the parser encountered a value-less parameter. A warning is now also logged if it encounters such a parameter, since value-less parameters are not permitted by the specs (see Ticket 1).
  • Fixed a bug that prevented VJOURNAL components from being read/written correctly (its marshaller class was missing).
  • The TZID parameter is now taken into account when reading/writing the RDATE property.
  • Added setLocalTime(boolean) method to certain date-time classes which instructs the library to format the timestamp according to local time (default timezone) when written.
  • The DTSTART property is now formatted according to local time (default timezone) when part of a STANDARD or DAYLIGHT component (timezone definition).
  • Added getter/setter methods to the VEvent and VTodo classes for VALARM components.
  • The ICalWriter class no longer logs warnings.
  • The ICalWriter class now throws an IllegalArgumentException if it cannot find the marshaller class of a property or component object.
  • Validation changes:
  • Property parameters are now validated when ICalendar.validate() is called. Each parameter is checked to make sure its value is valid (for example, confirming that RSVP is either "true" or "false") (see Ticket 2).
  • The values of the ACTION, CALSCALE, CLASS, STATUS, and TRANSP properties are now checked to ensure they use an acceptable value.
  • Validation warnings are now wrapped in a ValidationWarnings object. The ValidationWarnings object contains a list of WarningsGroup objects. Each WarningsGroup object contains a reference to the property/component that caused the warnings, references to the property/component's parent components, and a list of the validation warnings.
  • Added the ability to get/set the raw components of a date-time value for certain properties (see Ticket 3). This is useful for getting/setting the value of the DTSTART properties that are located within VTIMEZONE components.

New in biweekly 0.2.0 (Jul 8, 2013)

  • Added xCal support (XML-encoded iCalendar objects).
  • Added property cardinality validation to ICalendar.validate().