title: Adding Calendar Event from WebView
body: <p>I am following <a href="https://davidjhinson.wordpress.com/2012/04/13/creating-calendar-events-using-webview-in-android/" rel="nofollow">this tutorial</a> to made adding of calendar event from <code>WebView</code> possible. I understand that the method is using <code>shouldOverrideUrlLoading</code> for url <code>date:</code>.</p>
  
  <pre><code>public boolean shouldOverrideUrlLoading (WebView view, String url) {
  
  if (url.startsWith("date:")) {
  
  Log.d(this.getClass().getCanonicalName(),url);
  
  Calendar beginCal = Calendar.getInstance();
  
  Calendar endCal = Calendar.getInstance();
  
  Date beginDate = new Date(0, 0, 0);
  
  Date endDate = new Date(0, 0, 0);
  
  String parsed = url.substring(5);
  
  String[] components = parsed.split(",");
  
  beginDate.setMonth(Integer.parseInt(components[0]));
  
  beginDate.setDate(Integer.parseInt(components[1]));
  
  beginDate.setYear(Integer.parseInt(components[2]));
  
  beginCal.setTime(beginDate);
  
  endDate.setMonth(Integer.parseInt(components[3]));
  
  endDate.setDate(Integer.parseInt(components[4]));
  
  endDate.setYear(Integer.parseInt(components[5]));
  
  endCal.setTime(endDate);
  
  calendarevent(beginCal, endCal, components[6]);
  
  return true;
  
  }
  
  return false;
  
  }
  
  });
  </code></pre>
  
  <p>However, I can't understand the format of <code>date:</code> url which I should put:</p>
  
  <pre><code>&lt;a href='date:beginmonth, beginday, beginyear, 
  endmonth, endday, endyear, My Event Description'&gt;
  My event link&lt;/a&gt;
  </code></pre>
  
  <p>For example, I have an event on 15 September 2016, so I made the url become:</p>
  
  <pre><code>&lt;a href='date:09,15,2016,09,15,2016, My Event Description'&gt;
      My event link&lt;/a&gt;
  </code></pre>
  
  <p>I got the wrong date. The date become 11 May 2011. What the mistake I made?</p>