If you are creating a date by putting together a year and week number, then you would use the method above. To get the week number of a date, you can do DateTime::format (or just plain date()) and use the ‘W’ as the format.