date

Subtract dates in PHP [duplicate]

this question already has answers here : ... less what I wanted. The project will have information for months and did not want to have to create its own algorithm for it.

Calculate hours in PHP?

I am developing an electronic point in PHP and would like to know how to do the two-hour Caculo being one of them is negative ... example: Hourly load Day 1: -05:00:00 Hourly load Day 2: 08:00:00 How would the two-hour bill get the balance of hours?

Calculate age by day, month and year

I'm trying to calculate the age by day, month and year but I'm not getting it. I followed some examples but they all go wrong ... mento, então diminui 1. if (today.before(dateOfBirth)) { age--; } return age; }

Convert mysql data dd / mm / yyyy to yyyy-mm-dd

I have a database where I would insert the dates in the format dd/mm/yyyy (example: 05/11/1987), but now I am organizing some ... bering that this is not a duplicate as I am wanting to update the data in the database and not select them in another format.

Get last day of the Week returns date equivalent to one more day

To get the first day of the week of the date 07/10/2020, I used the function startOfWeek of the date-fns library. In this way ... 0/2020. const ultimoDiaSemana = endOfWeek(new Date(2020, 9, 7)); // 11/10/2020 errado I would like to know why this happens.