Ver original<?phpfunction week_number($date){ return idate(W, strtotime($date));} // Outputs: 4echo week_number('2007-01-23');?>