Home >Backend Development >PHP Tutorial >PHP gets quarter based on year and month

PHP gets quarter based on year and month

WBOY
WBOYOriginal
2016-07-25 08:48:282110browse
  1. function getQuarterByMonth($date){
  2. $month = substr($date,-2);
  3. $Q = ceil($month/3);
  4. return $Q;
  5. }
  6. ? >
Copy code


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn