Code Monkey home page Code Monkey logo

biweekly's Introduction

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

String str =
"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";

ICalendar ical = Biweekly.parse(str).first();

VEvent event = ical.getEvents().get(0);
String summary = event.getSummary().getValue();

Writing an iCal

ICalendar ical = new ICalendar();
  VEvent event = new VEvent();
    Summary summary = event.setSummary("Team Meeting");
    summary.setLanguage("en-us");

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

    Duration duration = new Duration.Builder().hours(1).build();
    event.setDuration(duration);

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

String str = Biweekly.write(ical).go();

Features

  • Simple, intuitive API (see Examples).
  • Android compatibility.
  • Full compliance with iCalendar and vCalendar specifications (see Supported Specifications).
  • Supports XML and JSON formats (see Supported Specifications).
  • Full timezone support (uses tzurl.org for 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 (see Dependencies).

Maven/Gradle

Maven

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

Gradle

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

Build Instructions

biweekly uses Maven as its build tool, and adheres to its convensions.

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 the issue tracker.

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

biweekly's People

Contributors

dependabot[bot] avatar dinomite avatar lf- avatar mangstadt avatar scottschmitz avatar toby-cisco avatar zeeshanasghar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.