This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

iCal calendar support

Former Member
Former Member
Hi,
I have a Garmin Forerunner 405HR sports watch and use Garmin Connect to track my exercises. I'd like to be able to view my exercises along with my private non-garmin calendars. I'm currently using google calendar which supports external calendar URL's ala http://hostname.tld/cal/123456.ics. It would be nice if Garmin Connect could export my training calendar like this.

This feature is also mentioned in https://forums.garmin.com/showthread.php?t=822 and https://forums.garmin.com/showthread.php?t=2956.

Jefferson J Hunt even wrote a script to deal with this: http://www.gurumeditations.org/2009/11/24/connect2ics-v1-4-0-released

I don't see any reason why Garmin Connect shouldn't have native support for this :-)


Below is an example on how to generate such calendars. It's from generating a birthday calendar, but you'll get the point anyway as it's quite easy to deal with:

[PHP]
<?
header('Content-Type: text/calendar');

printf('BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Test.com//NONSGML v1.0//EN
');

$profiles = $list->getProfilesByName();

foreach ($profiles as $p) {
try {
$date = DanishDateParser::parseDate($p['birth']);
printf('BEGIN:VEVENT
DTSTAMP:%sT060000
DTSTART:%s
RRULE:FREQ=YEARLY
UID:%[email protected]
SUMMARY:%s
END:VEVENT
',
$date,
$date,
$p['id'] .'-'.$date,
$p['name']
);
} catch (Exception $e) {
//print $e->getMessage();
// ignore illegal date format
continue;
}
}

printf('END:VCALENDAR');

?>
[/PHP]

The iCal file format is described here: http://en.wikipedia.org/wiki/ICalendar

Thank you for making a great user experience!