Gadgets, Computers and Nerdy Stuff
Archive for February, 2011
PHP: Determine the Quarter for a timestamp
Feb 3rd
PHP’s date and strftime functions are great for retreiving date-related info formatting them. The only thing missing is a way to determine the quarter (Q1-Q4) for a timestamp. Here’s a very short function that will return the quarter for a timestamp:
/** * Return the quarter for a timestamp. * @returns More >