Patuxent River at Jug Bay Predicted Tides
Tides in Google calendar format to integrate easily with staff, event, research,
and personal Google calendars make activity planning more efficient.
How can you use this example?
The tide table is available in icl format so it can be imported into calendars that support that format (Google calendar, Microsoft Outlook, etc.)
The Google Calendar shown above can be viewed using the following HTML
<iframe src="https://www.google.com/calendar/embed?src=nuaaj37rdo3aiaaq2eph2djh4oe7c3l2%40import.calendar.google.com&ctz=America/New_York" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
You can also view the calendar in your own Google Calendar by pasting the following in the "Other Calendars" section
To view this calendar it to your own Google Calendar, to the "Other Calendars" section and paste the following into the box that says "Add a friend's calendar"
How does it works?
The first step was to get the tide time and predicted heights. In this case, wxtides32 software was used to create the tide table in a computer readable format. A program was written to convert that data into the iCalendar (.icl file) format.
The icl format for each tide event looks like the following:
- The UID is an unique identifier. It was easy to use the date and time for this purpose.
- The DTSTART is the date and time in YYYMMDDThhmmssZ. T separates the date from the time. The final character is for the time Zone. In this case, UTC (universal coordinated time, also known as Greenwich Mean Time), coded as "Z" is used. This decision to use UTC was made to avoid complications for changes for Daylight Savings Time.
- Duration is set to 1 minute. This is short enough to display as a line in the calendar.
- The SUMMARY is what will be displayed. In this case, it is just H or L for high or low tide and the height of the tide.
- Setting TRANSP to TRANSPARENT means that the calendar event will not change your availability. Without this setting, the tide events would be considered to make you unavailable for other activities at that time.
- Search for "iCalendar" for details on the iCalendar format