Saneesh
Saneesh

Reputation: 1864

How to add events in CompactCalender library

I am working with CompactCalendarView library. I need to add some events in the calendar, so that they add the events like this:

Event ev2 = new Event(Color.GREEN, 1433704251000L);
compactCalendar.addEvent(ev2);

and this code will add Added event 2 GMT: Sun, 07 Jun 2015 19:10:51 GMT. how to convert the date and time to the event format(1433704251000L) ,

Upvotes: 1

Views: 407

Answers (1)

Jino Shaji
Jino Shaji

Reputation: 1103

The given representation (1433704251000L) is the conversion of this (2 GMT: Sun, 07 Jun 2015 19:10:51 GMT.) date and time into milliseconds. So you just convert the date and time into milliseconds.

Upvotes: 1

Related Questions