PHP 8.1.31 Released!

date_sub

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

date_subAlias of DateTime::sub()

Description

This function is an alias of: DateTime::sub()

See Also

  • DateTimeImmutable::sub() - Subtracts an amount of days, months, years, hours, minutes and seconds
  • DateTime::sub() - Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top