Get week of year in PHP

Description

The following code shows how to get week of year.

Example


<?php/*from w ww .j  a  va2s.  co m*/

$date = new Date();
$date->setDMY(4,7,1776);
echo $date->getWeekOfYear();

?>




















Home »
  PHP Tutorial »
    Data Types »




Array
Array Associative
Array Util
ArrayObject
Data Types
Date
Date Format
DateTime
Number
String
String Escape
String Filter
String HTML
String Type
Timezone