Skip to content
Subjects
Code examples
Library reference
Computer Programming
Python
Java
C++
C
Go
PHP
Kotlin
Ruby
R
Scala
Groovy
Tutorial menu
×
Subjects
Computer Programming
Maths
Planned
Chemistry
Planned
Lesson contents
Programming resources
All languages
Code examples
Library reference
Programming languages
Python
Java
C++
C
Go
PHP
Kotlin
Ruby
R
Scala
Groovy
Tutorials
/
Computer Programming
/
PHP
/
Library
/
Dates and time
PHP dates and time
Calculate a delivery date or count nights between bookings.
DateTimeImmutable::diff
DateTimeImmutable::format
DateTimeImmutable::createFromFormat
Search this section
Search
DateTimeImmutable::createFromFormat
Reject a date that the parser normalizes
DateTimeImmutable::diff
Count nights in a leap-year hotel stay
DateTimeImmutable::format
Print a consistent date on a receipt
DateTimeImmutable::modify
Calculate a delivery date across leap day
All PHP library sections