Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix end date for Google Calendar
Use Liquid filter to increase the date by one day.

I tested this and Google is smart to know
that YYYY0132, i.e. January 31st + 1, is YYYY0201,
i.e. February 1st.

Close #384.
  • Loading branch information
Raniere Silva committed Mar 16, 2017
1 parent e8d90f2 commit 8c88f0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions _includes/workshop_calendar.html
@@ -0,0 +1 @@
<a href="//calendar.google.com/calendar/render?action=TEMPLATE&text={% if page.carpentry == "swc" %}Software{% elsif page.carpentry == "dc" %}Data{% endif %} Carpentry Workshop&dates={{ page.startdate | replace: "-", "" }}/{{ page.enddate | replace: "-", "" | plus: 0}}&trp=false&sprop&sprop=name:&sf=true&output=xml&location={{ page.address }}&details={% if page.carpentry == "swc" %}Software{% elsif page.carpentry == "dc" %}Data{% endif %} Carpentry Workshop at {{ page.venue }}">Add to your Google Calendar.</a>
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -120,7 +120,7 @@ and the administrator will contact you if we need any extra information.</h4>
<p id="when">
<strong>When:</strong>
{{page.humandate}}.
<a href="//calendar.google.com/calendar/render?action=TEMPLATE&text={% if page.carpentry == "swc" %}Software{% elsif page.carpentry == "dc" %}Data{% endif %} Carpentry Workshop&dates={{ page.startdate | replace: "-", "" }}/{{ page.enddate | replace: "-", "" }}&trp=false&sprop&sprop=name:&sf=true&output=xml&location={{ page.address }}&details={% if page.carpentry == "swc" %}Software{% elsif page.carpentry == "dc" %}Data{% endif %} Carpentry Workshop at {{ page.venue }}">Add to your Google Calendar.</a>
{% include workshop_calendar.html %}
</p>
{% endif %}

Expand Down

0 comments on commit 8c88f0a

Please sign in to comment.