Created
May 10, 2010 09:04
-
-
Save igaiga/395842 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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