PHP implementation of the method based on timestamps to get weeks, PHP stamp gets weeks
The examples in this article describe how PHP implements the week-by-time timestamp. Share to everyone for your reference, as follows:
Gets the number of weeks of a timestamp, and the number of weeks after the next few days
which
$time Representative Time
$i start today.
The sample code is as follows:
function Gettimeweek ($time, $i = 0) { $weekarray = array ("One", "two", "three", "four", "five", "six", "Day"); $oneD = * *; Return "Week". $weekarray [Date ("W", $time + $oneD * $i)];} $time =time (); Echo Gettimeweek ($tiem);
More readers interested in PHP related content can view the topic: "PHP Date and Time usage summary", "PHP Object-oriented Programming tutorial", "PHP string (String) Usage Summary", "Php+mysql database operation Getting Started tutorial" and " A summary of common PHP database operation techniques
I hope this article is helpful to you in PHP programming.
Articles you may be interested in:
- PHP returns the current date or the specified date is the week
- PHP gets a few weeks a year and a weekly start date and end date
- How PHP gets the exact date of the week Monday
- How PHP Gets the start date and end date for the week
- PHP gets the start and end times of each week and month between the specified dates
- PHP calculates the number of weeks in a year and the start and end dates of the week
- PHP acquisition time excludes two methods for Saturday and Sunday
- PHP Gets the first day of the week and the last day sample code
- PHP gets constellation information and zodiac information based on date or time stamp
- Time Stamping and time conversion (PHP. NET to milliseconds)
- How PHP gets the millisecond timestamp
http://www.bkjia.com/PHPjc/1104334.html www.bkjia.com true http://www.bkjia.com/PHPjc/1104334.html techarticle PHP Implementation based on the time stamp to obtain the method of the week, PHP Stamp Acquisition Week This article describes the PHP implementation based on the time stamp to obtain the weeks of the method. Share to everyone for your reference, as follows: ...