Find Quarter Month From Year Script

A Quarter means 1/4 month of current year. In the Find Quarter Month From Year Script is use to find which quarter of the year a particular date.

Demo :



        Date :  

Example :

Date : 25-01-2011

Code :

Following code is used to find which quarter of the year if you need code to copy and use to your website.


<?php
  $month = 12;
  $date = 20;
  $year = 2020;
  $ts = mktime(0,0,0,$month,$date,$year);
  echo ceil(date("m", $ts)/3);
?>

In the above $month,$date and $year variable is assigned the month,date and year.which are sending to mktime() function.Next date() function is convert to mktime binary number to month.The ceil() function is rounded to month.

Free Download Script :

If you need Find Quarter Month From Year Script click and download from following link.

Download




Content