Skip to content
Advertisement

Calculate the first day of next month and quarter from today in PHP

For calculating the first dayof next month from today:

JavaScript

How to calculate the first day of next quarter from today?

  • First quarter, Q1: 1 January – 31 March
  • Second quarter, Q2: 1 April – 30 June
  • Third quarter, Q3: 1 July – 30 September
  • Fourth quarter, Q4: 1 October – 31 December

Thank you!

Advertisement

Answer

There may be more elegant ways but this does the trick

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement