week-number.net

Week number routines in different programming languages

Java PHP Python Linux/Unix Shell Script Perl MySQL

In many applications that make use of calendars, date and time it can be very helpful for the user to have information about week numbers (eg. for repetitions of appointments every odd week of the year).

This page shows you how to calculate the week number in various programming languages. Feel free to leave a comment if you miss a language or have a correction.