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

PHP gets quarter based on year and month

WBOY
Release: 2016-07-25 08:48:28
Original
2107 people have browsed it
  1. function getQuarterByMonth($date){
  2. $month = substr($date,-2);
  3. $Q = ceil($month/3);
  4. return $Q;
  5. }
  6. ? >
Copy code


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template