Saneesh Saneesh -4 years ago 183
Android Question

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) ,

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download