Adding a Resource View/Gannt chart to jQuery Fullcalendar
Just to update what has been done for this idea: https://github.com/jarnokurlin/fullcalendar It’s now a fork of fullcalendar.
Just to update what has been done for this idea: https://github.com/jarnokurlin/fullcalendar It’s now a fork of fullcalendar.
Key is df.setLenient(false);. This is more than enough for simple cases. If you are looking for a more robust (I doubt) and/or alternate libraries like joda-time then look at the answer by the user “tardate” final static String DATE_FORMAT = “dd-MM-yyyy”; public static boolean isDateValid(String date) { try { DateFormat df = new SimpleDateFormat(DATE_FORMAT); df.setLenient(false); … Read more
There are several non-Gregorian calendar classes derived from System.Globalization.Calendar within the Globalization namespace (i.e. JapaneseCalendar). You should be able to implement your own. I’d whip up a sample, but there are 16 abstract methods in the Calendar class… You might even be able to simply derive your class from GregorianCalendar and just override the GetMilliseconds(DateTime) … Read more
You can use SimpleDateFormat SimpleDateFormat sdf = new SimpleDateFormat(“dd/MM/yyyy”); Date d = sdf.parse(“21/12/2012”); But I don’t know whether it should be considered more right than to use Calendar …
public static Calendar convertToGmt(Calendar cal) { Date date = cal.getTime(); TimeZone tz = cal.getTimeZone(); log.debug(“input calendar has date [” + date + “]”); //Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT long msFromEpochGmt = date.getTime(); //gives you the current offset in ms from GMT at the current date int offsetFromUTC = tz.getOffset(msFromEpochGmt); … Read more
The links in Dave’s post are great. Just to put a few technical details about the google links into an answer here on SO: Google Calendar Link <a href=”http://www.google.com/calendar/event?action=TEMPLATE&text=Example%20Event&dates=20131124T010000Z/20131124T020000Z&details=Event%20Details%20Here&location=123%20Main%20St%2C%20Example%2C%20NY”>Add to gCal</a> the parameters being: action=TEMPLATE (required) text (url encoded name of the event) dates (ISO date format, startdate/enddate – must have both start and end … Read more
Here’s a function from the user comments on the date() function page in the PHP manual. It’s an improvement of an earlier function in the comments that adds support for leap years. Enter the starting and ending dates, along with an array of any holidays that might be in between, and it returns the working … Read more
Use this : Calendar cal=Calendar.getInstance(); SimpleDateFormat month_date = new SimpleDateFormat(“MMMM”); String month_name = month_date.format(cal.getTime()); Month name will contain the full month name,,if you want short month name use this SimpleDateFormat month_date = new SimpleDateFormat(“MMM”); String month_name = month_date.format(cal.getTime());
Months are indexed from 0 not 1 so 10 is November and 11 will be December.
This should be very simple if Google Calendar does not require the *.ics-extension (which will require some URL rewriting in the server). $ical = “BEGIN:VCALENDAR VERSION:2.0 PRODID:-//hacksw/handcal//NONSGML v1.0//EN BEGIN:VEVENT UID:” . md5(uniqid(mt_rand(), true)) . “@yourhost.test DTSTAMP:” . gmdate(‘Ymd’).’T’. gmdate(‘His’) . “Z DTSTART:19970714T170000Z DTEND:19970715T035959Z SUMMARY:Bastille Day Party END:VEVENT END:VCALENDAR”; //set correct content-type-header header(‘Content-type: text/calendar; charset=utf-8’); header(‘Content-Disposition: … Read more