01-16-2020
Update:
This year we have a a tie for "Moderator of the Year" 2019, and will be making the formal announcement this month
.
Also, the "Poster of the Year" 2019, as also been selected as well. Will also announce later this month when I have a chance.
Cheers!
8 More Discussions You Might Find Interesting
1. What is on Your Mind?
Congrats to Corona688 for a much deserved and long overdue lifetime achievement award badge from UNIX.COM in computer wizardry:
"The Order of the Wizard's Hat - Lifetime Achievement Award"
This "Order of the Wizard's Hat" is presented to Corona688 in 2019 for UNIX Wizardry and his continued... (6 Replies)
Discussion started by: Neo
6 Replies
2. What is on Your Mind?
Please join me in congratulations to Wolf Machowitsch (bakunin) for his long overdue lifetime achievement award badge from UNIX.COM in computer wizardry:
"The Order of the Wizard's Hat - Lifetime Achievement Award"
This "Order of the Wizard's Hat" is presented to Wolf Machowitsch (bakunin)... (11 Replies)
Discussion started by: Neo
11 Replies
3. What is on Your Mind?
Congrats to wisecracker for the first lifetime achievement award badge from UNIX.COM in computer wizardry:
"The Order of the Wizard's Hat - Lifetime Achievement Award"
The first "Order of the Wizard's Hat" is presented to wisecracker in 2019 for RF Electronics Engineering and Computer... (6 Replies)
Discussion started by: Neo
6 Replies
4. What is on Your Mind?
Please join me in congratulating RudiC for his long overdue lifetime achievement award badge from UNIX.COM in computer wizardry:
"The Order of the Wizard's Hat - Lifetime Achievement Award"
This "Order of the Wizard's Hat" is presented to RudiC for Computer Wizardry in the UNIX Operating... (10 Replies)
Discussion started by: Neo
10 Replies
5. What is on Your Mind?
Please join me in congratulating Scrutinizer for his long overdue lifetime achievement award badge from UNIX.COM in computer wizardry:
"The Order of the Wizard's Hat - Lifetime Achievement Award"
This "Order of the Wizard's Hat" is presented to Scrutinizer for Computer Wizardry in the UNIX... (7 Replies)
Discussion started by: Neo
7 Replies
6. What is on Your Mind?
This is mainly for Corona688, today's date 18-09-2019.
Remember from little acorns big trees grow a few months ago?
Well this is well on the way to 1000+ dls by the end of the year...
AMINET from its inception in 1992 is accessed by very, very many and the AMIGA is still loved by millions.
... (1 Reply)
Discussion started by: wisecracker
1 Replies
7. What is on Your Mind?
Dear All,
I am pleased to post that I am announcing a new award, "Poster of the Year 2019" and calling for your nominations (privately to me).
This is a new award and I plan to announce the winner for this year (2019) in January 2020. The prizes will be (still working out the details):
... (0 Replies)
Discussion started by: Neo
0 Replies
8. What is on Your Mind?
Today, I am very pleased to announce the Poster of the Year Award, 2019 is Jeroen van Dijke (Scrutinizer)
Jeroen has been a member of unix.com just over 11 years (He first joined unix.com in November 2008) and has been a very valuable, reliable and thoughtful resource for countless people over... (3 Replies)
Discussion started by: Neo
3 Replies
LEARN ABOUT PHP
datetime.setdate
DATETIME.SETDATE(3) 1 DATETIME.SETDATE(3)
DateTime::setDate - Sets the date
Object oriented style
SYNOPSIS
public DateTime DateTime::setDate (int $year, int $month, int $day)
DESCRIPTION
Procedural style
DateTime date_date_set (DateTime $object, int $year, int $month, int $day)
Resets the current date of the DateTime object to a different date.
PARAMETERS
o $object
-Procedural style only: A DateTime object returned by date_create(3). The function modifies this object.
o $year
- Year of the date.
o $month
- Month of the date.
o $day
- Day of the date.
RETURN VALUES
Returns the DateTime object for method chaining or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | Changed the return value on success from NULL to |
| | DateTime. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
DateTime.setDate(3) example
Object oriented style
<?php
$date = new DateTime();
$date->setDate(2001, 2, 3);
echo $date->format('Y-m-d');
?>
Procedural style
<?php
$date = date_create();
date_date_set($date, 2001, 2, 3);
echo date_format($date, 'Y-m-d');
?>
The above examples will output:
2001-02-03
Example #2
Values exceeding ranges are added to their parent values
<?php
$date = new DateTime();
$date->setDate(2001, 2, 28);
echo $date->format('Y-m-d') . "
";
$date->setDate(2001, 2, 29);
echo $date->format('Y-m-d') . "
";
$date->setDate(2001, 14, 3);
echo $date->format('Y-m-d') . "
";
?>
The above example will output:
2001-02-28
2001-03-01
2002-02-03
SEE ALSO
DateTime.setISODate(3), DateTime.setTime(3).
PHP Documentation Group DATETIME.SETDATE(3)