Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igaiga/395842 to your computer and use it in GitHub Desktop.
Save igaiga/395842 to your computer and use it in GitHub Desktop.
<h3>Japanese Public Holidays 2010</h3>
<div id="agenda"></div>
<script>
function listEvents(root) {
var feed = root.feed;
var entries = feed.entry || [];
var html = ['<ul>'];
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
var title = entry.title.$t;
var start = (entry['gd$when']) ? entry['gd$when'][0].startTime : "";
if ( start.match( /^2010/ ) ) {
html.push('<li>', start, ' ', title, '</li>');
}
}
html.push('</ul>');
document.getElementById("agenda").innerHTML = html.join("");
}
</script>
<script src="http://www.google.com/calendar/feeds/japanese__ja@holiday.calendar.google.com/public/full?alt=json-in-script&callback=listEvents">
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment