This is PHP
Matt's ical / google calendar week number system

Arbitrary week number generator for ical compatible calendars

If you require week numbers for you calendar but your week one does not on the first week of the year you have some problems. Google Calendar and several other gizmos offer week numbers but they all start on the first week in January. This php script can help.

Instructions: enter a name for your calendar, choose the date to match the first day of the first week for your week one and press the do it button. The script will take you to a directory where your week number calendar is stored. Save this to your computer and then import it into your calendar. In google calendars I recommend creating a new calendar called week numbers and then importing the events to this (it makes it easier to delete the dates if you go wrong and makes it easy to change colours etc etc). the import function is via the "gear" that appears top right: calendar settings:calendars:import calendar. Remeber to import to "week numbers" for ease of use.

I want google week numbers starting on...

Start date:
/ /
Thanks to: Stefan at