Calendar Year View Web Part Code Example

Had a few requests on my previous post about the Calendar Year View for a coded example. So here’s one. I’ve not fully tested this in quite a while so it might not work immediately and might need one or two modifications to the object model code to access the List properly, there’s probably some unused namespaces in the usings section, and it’s generally pretty old code (around 2 years old now, from when I first started out on developing for SharePoint, so do pick it apart and point out bad practices I’ve missed out in the comments for others to see) but should give you a good start if you want to implement something similar.