The present invent
We’re back! Join h
LOS ANGELES -- It'
Q: How to set the
Methanotrophs colo
Oil and water, yin
Q: XPATH querying
The present invent
Q: How can I add
Q: How to convert

[A case of bilater
The Grape Vine Mo
Bangladesh Bangla
Q: How to determi
Introduction =====
#!/usr/bin/env pyt
How To Get Your F
Fracture rate and
For anyone interes
The Duel The Duel
Q: PHP date() function for future dates I am using date() function as follows: echo date("d-M-Y",strtotime('+10 days')); Output is: 04-May-2017, but what if I want the result as: 05-May-2017? How to achieve this? A: I'd recommend adding 0 to the number of days you want, if you want it "ten days from now" you'd have to add the number of days to one year and then subtract that from the date() object. If you don't want it as a number, you'd have to use strftime() instead. If you really just want the date with the day number "one day" from now, use: date("d-M-Y", strtotime("+1 day")); You could also use Carbon::add(). $time = Carbon::createFromDate(2016, 2, 1); $time->addDays(1); echo $time->format("d-M-Y"); Or, from the moment you have the current date: $time = Carbon::now(); echo $time->format("d-M-Y"); Carbon::add() also has a function for minutes, hours, days and seconds. If you do want it as a number, you'll need to use strtotime() instead. echo date("d-M-Y", strtotime("+10 days")); This function only takes strings though. Output: 04-May-2017 Edit: Here's an example: $time = date("d-M-Y", strtotime("+10 days")); echo $time; // 04-May-2017 echo $time->format("d-M-Y"); // 04-May-2017 Another edit: $time = date("d-M-Y", strtotime("+10 days")); echo $time; // 04-May-2017 echo $time->format("d-M-Y"); // 04-May-2017 $time = Carbon::now(); echo $time->addDays(10)->format("d-M-Y"); // 05-May-2017 A: Just adding one day: echo date("d-M-Y",strtotime("+1 day")); Will output: 05-May-2017 Adding ten days: echo date("d-M-Y",strtotime("+10 days")); Will output: 05-May-2017 A: The format in which it returns is: Y-m-d E.g: 2016-09-15 To display the date as 4th day, you can add 1 to the time and format it as a date: $date = date("Y-m-d", strtotime("+1 day")); echo $date; This will display: 2016-11-25 Hope this helps :) https://www.w3schools.com/php/func_date_strtotime.asp http://php.net/manual/en/function.date.php