php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "two-digit year"

What is the difference between using "o" and "Y" in the date function when extracting the year from a date string in PHP?

When extracting the year from a date string in PHP, using "o" will return the ISO-8601 year number while using "Y" will return the four-digit year num...

How can the current year be displayed in PHP?

To display the current year in PHP, you can use the `date()` function with the 'Y' format specifier, which represents the year in a four-digit format....

What is the best way to extract a two-digit month from an RFC 2822 formatted date in PHP?

To extract a two-digit month from an RFC 2822 formatted date in PHP, you can use the `DateTime` class to parse the date string and then use the `forma...

What is the best way to determine the year of a specific date in PHP?

To determine the year of a specific date in PHP, you can use the date() function along with the 'Y' format character, which represents the year in a f...

What are some efficient methods for truncating dates in PHP, such as removing time and shortening the year?

When working with dates in PHP, it is often necessary to truncate or modify the format of the date. One common task is to remove the time component fr...

Showing 11 to 15 of 3908 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 781 782 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.