Skip to content

Tag Archives: PHP-date-time

The DateTimeImmutable::add() function is an inbuilt function in PHP which is used to add a number of days, months, years, hours, minutes and seconds to… Read More
The date_create_immutable_from_format() function is an inbuilt function in PHP which is used to parse a time string according to the specified format. Syntax:  Object oriented… Read More
The DateTime::createFromFormat()function is an inbuilt function in PHP which returns a new DateTime object representing the date and time format. Syntax: Object oriented style: DateTime… Read More
The DateTime::format() function is an inbuilt function in PHP which is used to return the new formatted date according to the specified format. Syntax: Object… Read More
The DateTimeImmutable::setTimestamp() function is an inbuilt function in PHP which is used to set the date and time based on an Unix timestamp. Syntax: DateTimeImmutable… Read More
The DateTime::diff() function is an inbuilt function in PHP which is used to return the difference between two given DateTime objects. Syntax: Object oriented style:… Read More
The DateTime::modify() function is an inbuilt function in PHP which is used to modify or can alter the timestamp of a DateTime object. Syntax: Object… Read More
The DateTime::add() function is an inbuilt function in PHP which is used to add an amount of time (days, months, years, hours, minutes and seconds)… Read More
The DateTimeZone::getName() function is an inbuilt function in PHP which is used to return the name of the created timezone. Syntax: DateTimeZone::getName() Parameters: This function… Read More
The DateTimeImmutable::modify() function is an inbuilt function in PHP which is used to modify or alter the timestamp of the created DateTimeImmutable object. Syntax: DateTimeImmutable… Read More
The DateTime::sub() function is an inbuilt function in PHP which is used to subtract a number of days, months, years, hours, minutes and seconds from… Read More
The DatePeriod::getStartDate() function is an inbuilt function in PHP which is used to return the start date of the given date period. Syntax: DateTimeInterface DatePeriod::getStartDate(… Read More
The DatePeriod::getDateInterval() function is an inbuilt function in PHP which is used to return the date interval for the given date period. Syntax: DateInterval DatePeriod::getDateInterval(… Read More
The DatePeriod::getEndDate() function is an inbuilt function in PHP which is used to return the end date. If the given date period does not have… Read More
The calendar extension contains a series of functions to represent the calendar date into a different format. The standard date is based on Julian Day… Read More