def build_period_name(cls, pdate, interval='quarter', offset=None, start_date=False):
        """
        Build the period name for humans (eg, 18-Q2) to be used in the reports.
        Just supporting quarters right now.
        The name is built using the last month for the quarter.

        :param pdate: the date (datetime) which defines the period
        :param interval: the time interval (string)  used in the report
        :param start_date: if False, pdate is the end of the period date
        :return: the period name for humans (eg, 18-Q2)
        """

        if interval not in ['quarter']:
            raise RuntimeError("Interval not support in build_period_name", interval)

        name = pdate.strftime('%Y-%m-%d') + ' ' + interval
        months_in_quarter = 3
        end_quarter_month = None

        if interval == 'quarter':
            if offset:
                # +31d offset format
                offset_days = int(offset[1:-1])
                pdate = pdate - timedelta(days=offset_days)
            if not start_date:
                # pdate param is the first day of the next quarter
                # Remove one day to have a date in the end_quarter_month
                pdate = pdate.replace(day=1) - timedelta(days=1)
                year = pdate.strftime('%y')
                end_quarter_month = int(pdate.strftime('%m'))
            else:
                # pdate param is the first day of the period
                # add months_in_quarter to have the last month of the quarter
                year = pdate.strftime('%y')
                end_quarter_month = int(pdate.strftime('%m')) + months_in_quarter - 1

            quarter = int(round(int(end_quarter_month) / months_in_quarter, 0))
            name = year + "-Q" + str(quarter)

        return name