[ create a new paste ] login | about

Link: http://codepad.org/Z1zWIaiD    [ raw code | output | fork | 1 comment ]

PHP, pasted on Feb 2:
1
2
3
4
5
6
7
8
9
<?php
if(date('m') >= 06) {
   $d = date('Y-m-d', strtotime('+1 years'));
   echo   date('Y') .'-'.date('y', strtotime($d));
} else {
  $d = date('Y-m-d', strtotime('-1 years'));
  echo   date('Y', strtotime($d)).'-'.date('y');
}
?>


Output:
1
2015-16


Create a new paste based on this one


Comments:
posted by final_testing on May 31
test
reply