Skip to content

Instantly share code, notes, and snippets.

@Neolot
Last active October 8, 2015 01:29
Show Gist options
  • Select an option

  • Save Neolot/3256374 to your computer and use it in GitHub Desktop.

Select an option

Save Neolot/3256374 to your computer and use it in GitHub Desktop.
PHP Возвращает годы работы сайта
<?php
function getSince($start){
if ( date('Y') <= $start) {
return $start;
} else {
return $start.'-'.date('Y');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment