Skip to content

mangstadt/biweekly

Repository files navigation

biweekly

Continuous Integration:
Code Coverage: codecov.io
Maven Central: Maven Central
Chat Room: Gitter
License: FreeBSD License

biweekly is an iCalendar library written in Java. The project aims to provide a well documented, easy to use API for reading and writing iCalendar data.

Downloads| Javadocs| Maven/Gradle|Documentation

Code sample

Reading an iCal

Stringstr=
"BEGIN:VCALENDAR\r\n"+
"VERSION:2.0\r\n"+
"PRODID:-//Microsoft Corporation//Outlook 14.0 MIMEDIR//EN\r\n"+
"BEGIN:VEVENT\r\n"+
"UID:0123\r\n"+
"DTSTAMP:20130601T080000Z\r\n"+
"SUMMARY;LANGUAGE=en-us:Team Meeting\r\n"+
"DTSTART:20130610T120000Z\r\n"+
"DURATION:PT1H\r\n"+
"RRULE:FREQ=WEEKLY;INTERVAL=2\r\n"+
"END:VEVENT\r\n"+
"END:VCALENDAR\r\n";

ICalendarical=Biweekly.parse(str).first();

VEventevent=ical.getEvents().get(0);
Stringsummary=event.getSummary().getValue();

Writing an iCal

ICalendarical=newICalendar();
VEventevent=newVEvent();
Summarysummary=event.setSummary("Team Meeting");
summary.setLanguage("en-us");

Datestart=...
event.setDateStart(start);

Durationduration=newDuration.Builder().hours(1).build();
event.setDuration(duration);

Recurrencerecur=newRecurrence.Builder(Frequency.WEEKLY).interval(2).build();
event.setRecurrenceRule(recur);
ical.addEvent(event);

Stringstr=Biweekly.write(ical).go();

Features

  • Simple, intuitive API (seeExamples).
  • Android compatibility.
  • Full compliance with iCalendar and vCalendar specifications (seeSupported Specifications).
  • Supports XML and JSON formats (seeSupported Specifications).
  • Full timezone support (usestzurl.orgfor timezone definitions).
  • Extensive unit test coverage.
  • Low Java version requirement (1.6 or above).
  • Few dependencies on external libraries. Dependencies can be selectively excluded based on the functionality that is needed (seeDependencies).

Maven/Gradle

Maven

<dependency>
<groupId>net.sf.biweekly</groupId>
<artifactId>biweekly</artifactId>
<version>0.6.8</version>
</dependency>

Gradle

implementation 'net.sf.biweekly:biweekly:0.6.8'
//use `api` if you are exposing parts of biweekly in your API

Build Instructions

biweekly usesMavenas its build tool, and adheres to its conventions.

To build the project:mvn compile
To run the unit tests:mvn test
To build a JAR:mvn package

Questions / Feedback

You have some options:

Please submit bug reports and feature requests to theissue tracker.

This project was born on June 23, 2013 onSourceforge.It migrated to Github on November 22, 2015.

About

biweekly is an iCalendar library written in Java.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages