0.1.4 • Published 8 years ago

event-parser.js v0.1.4

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Event Parser

Рarses events written in plain English, and returns an object defining a basic event.

##Features

  • detects various dates
  • detects relative dates
  • support multiple formats
  • detects recurrency
  • suggests event title, places and involved names at given subject

##Achtung Library is in development. All features not implemented yet. Feel free to submit bugs, unit tests, and suggest improvements as well.

##Usage

var event = "Have fun with Jane at home on 11th dec".parseEvent({

	// callback called after parse is done;
	onParsed: function() {},

   	// callback called after each instance of date is parsed;
    onDateParsed: function (parsedDateArray) {},

   	// callback called after each instance of time is parsed;
    onTimeParsed: function (parsedTimeArray) {}
});
{
	title: "Have fun with Jane at home at 12 dec 2020",
	startDate: "‌Sun Dec 12 2020 00:00:00 GMT+0300",
	endDate: undefined,
	allDay: true,
	isRecurrent: false
}

##Install Use Bower to install library:

bower install event-parser.js

##Todo

  • Support RRULE

##Inspired by

Author

Copyright and license

Code and documentation copyright 2011-2016 by Andrew Rumm. Code released under the MIT license.