how can i work with dates before 01.01.1970?
i need to get first day of the month for dates from year 1700.
how can i achieve that?
thank you in advance!
You can use DateTime
.
Example:
<?php
$d = new DateTime("1780-06-01");
echo $d->format("l"); //Thursday
You should, however, consider that the Gregorian Calendar was adopted in different instants throughout the world.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With