Created
January 3, 2014 22:45
-
-
Save greatislander/8248143 to your computer and use it in GitHub Desktop.
Display appropriate license timespan starting from a certain year, e.g. 2014 if the license began in 2014 and it is currently 2014, or 2013–2014 if the license began in 2013 and it is currently 2014.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $start = '2013'; echo ( date('Y') > $start ) ? $start . '–' . date('Y') : $start; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment