Compare two dates in PHP

Содержание
Example
Related articles

<?php // Find out whether Cosmonautics Day passed this year or not // Today date in month-day format $today_m_d = date("m-d"); $cosmo = "04-12"; // Include utils.php if ($today_m_d > $cosmo) { echo"Cosmonautics Day already passed this year"; } else { echo"Cosmonautics Day is not celebrated yet"; }; ?>

Cosmonautics Day already passed this year

Article author: Andrei Olegovich

Похожие статьи
Development with PHP
Arrays in PHP
Date and Time in PHP - basics
How to display time of multiple timezones in PHP
How to add variable to url in PHP
json_decode
How to get screen size with PHP
Call function from another file
Premature end of chunk coded message body: closing chunk expected
Generate unique random numbers with PHP
Check your HTTP_USER_AGENT
Compare two dates
OOP
Namespaces in PHP
Comments in PHP
Cookies
PHP sessions
Authentication and Authorization in PHP 8
PHP linters we use
PHP errors: case studies
card_from_db(): banner card from a DB row
PHP versions: history in brief
Creating rules in .htaccess
require, require_once, include, include_once
Flat pair arrays: three pitfalls from the Related articles block
Deduplication in PHP
PHP course: zero to hero in 50 lessons

Search this site

Subscribe to Telegram channel @aofeed to follow new articles and updates to old ones

Go to channel

@aofeed

Ask a question in the Telegram group

@aofeedchat

Contacts and cooperation:
I recommend our hosting beget.ru
Write to info@urn.su if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: