This article mainly introduces the time function date in PHP and the relevant knowledge of time calculation, which has a good reference value. Let's take a look at the little series.
have been in the project need to use to today, yesterday, this
Php returns the current date or the specified date is the day of the week. Php returns the current date or specifies the date of the week. This article will share with you the formatting methods of several date functions, which is very simple and
Common time processing methods for PHPdate functions. Common time processing methods for PHPdate functions this article mainly introduces common time processing methods for PHPdate functions, this article describes how to obtain the common time
Today is the day of the week written in PHP // The first writing method $ da = date (& quot; w & quot;); if ($ da ==& quot; 1 & quot ;) {& nbsp; echo & quot; today is Monday & quot; ;}elseif ($ da ==& quot; 2 & quot ;) {& n today is the day of the
Echo ' The first day of the week (Sunday is the beginning of the week): '. Date (' y-m-d ', Time () -86400*date (' W ')). '';
Echo ' The first day of the week (Monday is the beginning of the week): '. Date (' y-m-d ', Time () -86400*date (' W
1, year-month-day
echo Date (' y-m-j ');
2007-02-6
echo Date (' y-n-j ');
07-2-6
Uppercase Y represents the year four digits, while lowercase y represents the two digits of the year;
Lowercase m represents the number of months (with leading),
Today is the day of the week written in PHP. The first method is $ dadate (& quot; w & quot;); if ($ da & quot; 1 & quot;) {& nbsp; & nbsp; echo & quot; today is Monday & quot;} elseif ($ da & quot; 2 & quot;) {& nbsp; echo today is the day of the
Common time processing method of PHP date function
This article mainly introduces the PHP date function commonly used time processing method, this article introduces to get today, tomorrow, yesterday, a week later, one months ago, one months after
Number of days of the week in a loop (the red letter shows the number of days of the week)$ Week_array = array (1, 2, 3, 4, 5, 6, 7 );Foreach ($ week_array as $ key => $ value){If ($ value = date ("W "))$ Value = "". $ value. " ";Echo$ Value ."";}
Php:This week an echodate(' y-m-d ',(Time ()-(date(' W ') ==0?7:date// W is the number form of the day of the week, where 0 is Sunday this Sunday Echo Date (' y-m-d ', (time () + (7-)(Date(' W ') ==0?7:date// same as W, with current and Sunday
PHP Week Get Code:1 Date ("L");2//data can get English for weeks like Sunday3 Date ("W");4//This can get digital weeks like 123, note 0 is SundayGet Chinese Weekday:1 $weekarray =array ("Day", "one", "two", "three", "four", "Five", "VI");2//define
1. Describe the boot process from the Linux system to the login interface.Answer:(1) Power boot, BIOS self-test(2) MBR boot(3) Grub boot Menu(4) Loading the kernel(5) Start the INIT process(6) Read Inittab files, execute scripts such as
Mondayecho Date (' y-m-d ', (Time ()-((Date (' W ') ==0?7:date (' W ') ')-1) *24*3600)); W is the number form of the day of the week, where 0 is SundayThis Sundayecho Date (' y-m-d ', (Time () + (7-(' W ') ==0?7:date (' W ')) *24*3600)); Also use W
1, year-month-day
echo Date (' y-m-j ');
2007-02-6
echo Date (' y-n-j ');
07-2-6
Capital Y represents a four-digit year, while lowercase y represents a two-digit number for the year;
Lowercase m represents the number of months (with leading),
Copy Code code as follows:
The first form of writing
$da = Date ("W");
if ($da = = "1") {
echo "Today is Monday";
}else if ($da = = "2") {
echo "Today is Tuesday";
}else if ($da = = "3") {
echo "Today is Wednesday";
}else if ($da = = "4"
Rman backup script rman shell script editing is first tested in rman to check whether the backup is normal. The statement is being judged. Backup script sh command export target/msglog =/oracle/ora10g/rmanbak/bakl0.log export file
PHP (PHP training PHP Tutorial) in the date () datetime function in detail, the need for friends can refer to the next.1, year-month-dayecho Date (' y-m-j ');2007-02-6echo Date (' y-n-j ');07-2-6Uppercase Y represents the year four digits, while
Today is the day of the week in many ways, this article has compiled three commonly used, interested friends can understand
The Code is as follows:
// Method 1$ Da = date ("w ");If ($ da = "1 "){Echo "Today is Monday ";} Else if ($ da = "2
PHP Get Week method Daquan Simple Introduction
PHP Gets the week method Daquan simple introduction, PHP week to get code:
1 Date ("L");
2//data can get English for weeks like Sunday
3 Date ("W");
4//This can get digital weeks like 123, note 0 is
// The first method: $ da = date ("w"); if ($ da = "1") {echo "Today is Monday ";} else if ($ da = "2") {echo "Today is Tuesday";} else if ($ da = "3") {echo "Today is Wednesday ";} else if ($ da = "4") {echo "Today is Thursday";} else if ($ da = "5"
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.