Skip to content

Instantly share code, notes, and snippets.

@jsakamoto
Created March 4, 2013 03:59
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 jsakamoto/5079816 to your computer and use it in GitHub Desktop.
Save jsakamoto/5079816 to your computer and use it in GitHub Desktop.
How to retrieve Japanese Holidays from Apple web site with DDay.ICal library by F# Script.
// download from http://sourceforge.net/projects/dday-ical/files/
#r @"DDay.Collections.dll"
#r @"DDay.iCal.dll"
open DDay.iCal
open System
open System.Linq
new Uri("http://ical.mac.com/ical/Japanese32Holidays.ics")
|> iCalendar.LoadFromUri
|> Seq.collect (fun x -> x.Events)
|> Seq.iter (fun x -> printfn "%s - %s" (x.Start.ToString()) (String.Join(", ", x.Resources)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment