Returns the markup for the header of a month table.

@param  Month $month
@return string
178183
public function monthTitle(Month $month)
    {
        $weekendClass = 'bm-calendar-weekend';

        $monthName = self::$monthNames[$month->value()];

        $output  = '<thead>';
        $output .= '<tr>';

        $output .= '<th colspan="7" class="bm-calendar-month-title">' . $monthName . '</th>';

        $output .= '</tr><tr>';

        // Display the headings for the days of the week.
        for ($column = 0; $column < 7; $column++) {
            $day = ($column + $this->startDay - 1) % 7 + 1;

            if (DayInterface::SATURDAY === $day || DayInterface::SUNDAY === $day) {
                $output .= '<th class="' . $weekendClass . '">';
            } else {
                $output .= '<th>';
            }
            $output .= self::$dayNames[$day];
            $output .=  '</th>';
        }

        $output .= '</tr>';
        $output .= '</thead>';

        return $output;
    }
346554
public function byMonths(int $months): Date
    {
        return $this->monthTo($this->originalDate->month() + $months);
    }
275683
public function months($render = 'form')
    {
        $this->viewBuilder()->setTemplate(sprintf('months_as_%s', $render));

        //Returns on posts index
        if ($this->request->isUrl(['_name' => 'posts'])) {
            return;
        }

        $query = $this->Posts->find('active');
        $time = $query->func()->date_format(['created' => 'identifier', "'%Y/%m'" => 'literal']);
        $months = $query->select([
                'month' => $time,
                'post_count' => $query->func()->count($time),
            ])
            ->distinct(['month'])
            ->formatResults(function (ResultSet $results) {
                return $results->indexBy('month')
                    ->map(function (Post $post) {
                        list($year, $month) = explode('/', $post->month);
                        $post->month = (new FrozenDate())->day(1)->month($month)->year($year);

                        return $post;
                    });
            })
            ->order(['month' => 'DESC'])
            ->cache('widget_months', $this->Posts->getCacheName())
            ->all();

        $this->set(compact('months'));
    }
830878
public static function getEndDate($month = null, $day = null)
    {
        if ($month == null && $day == null) {
            // tomorrow
            $date = new \DateTime(Utils::getNextDay(date('m'), date('d')));
        } else 
            if ($day == null) {
                // first day of next mnth
                $date = new \DateTime(Utils::getNextMonthFirstDay($month, $day));
            } else {
                // date +1 day
                $date = new \DateTime(Utils::getNextDay($month, $day));
            }
        return $date->format('Y-m-d');
    }
1058326
public static function lastDayOfMonth($month = null, $year = null, $format = 'Y-m-d')
    {
        $year = $year ? $year : date('Y');
        $month = $month ? $month : date('m');
        return date($format, mktime(0, 0, 0, $month + 1, 0, $year));
    }
222096
public function getMonthNamesNarrow($month = null)
    {
        $calendar = $this->getName();
        // gregorian, generic

        $data = array();
        $calendsFallback = array($calendar, 'gregorian', 'generic');
        foreach ($calendsFallback as $calendar) {
            $data = $this->getRepoReader()->getEntityByPath(
                'dates/calendars/calendar[@type="'.$calendar.'"]/months/monthContext[@type="format"]/monthWidth[@type="abbreviated"]/month'
            );

            if ($data) {
                break;
            }
        }

        $months = array();
        foreach($data as $d) {
            $months[$d['type']] = $d['value'];
        }

        $return = ($month == null) ? $months : false;

        return isset($months[$month]) ? $months[$month] : $return;
    }
927718
public function showMonth($year, $month)
    {
        if (null !== $this->partial) {
            $partial = $this->view->plugin('partial');

            $params = array(
                'calendar' => $this->calendar,
                'startDay' => $this->startDay,
                'year'     => $year,
                'month'    => $month,
            );

            return $partial($this->partial, $params);
        }

        $renderer = $this->getRenderer();

        $renderer->setCalendar($this->calendar);
        $renderer->setStartDay($this->startDay);

        return $renderer->renderMonth($year, $month);
    }
386969
private static function jdMonthNameCalendar(CalendarInterface $calendar, $julian_day, $months)
    {
        list(, $month) = $calendar->jdToYmd($julian_day);

        return $months[$month];
    }
1123966
void formatMonth(StringBuilder b, ZonedDateTime d, int width, FieldVariants months) {
    int month = d.getMonth().getValue();
    switch (width) {
      case 5:
        b.append(months.narrow[month-1]);
        break;

      case 4:
        b.append(months.wide[month-1]);
        break;

      case 3:
        b.append(months.abbreviated[month-1]);
        break;

      case 2:
        if (month < 10) {
          b.append('0');
        }
        // fall through

      case 1:
        b.append(month);
        break;
    }
  }
71780
function clMonthToMonth (clMonth) {
  assert.equal(typeof clMonth, 'string', `[senadores-asistencia]: No se puede convertir el mes ${clMonth}`)
  const months = {
    Enero: 0,
    Febrero: 1,
    Marzo: 2,
    Abril: 3,
    Mayo: 4,
    Junio: 5,
    Julio: 6,
    Agosto: 7,
    Septiembre: 8,
    Octubre: 9,
    Noviembre: 10,
    Diciembre: 11
  }
  assert.ok(months[clMonth] >= 0 && months[clMonth] < 12, `[senadores-asistencia]: No se puede convertir el mes ${clMonth}`)
  return months[clMonth]
}
757422
public static function createFromMonth($year, $month)
	    {
	        $year  = self::validateYear($year);
	        $month = self::validateRange($month, 1, 12);

	        return self::createFromDuration($year.'-'.sprintf('%02s', $month).'-01', '1 MONTH');
	    }
940982
function _getHeaderLine() {
        // Make sure column count is correct
        for ($j = 0; $j < count($this->_headers); $j++) {
            for ($i = 0; $i < $this->_max_cols; $i++) {
                if (!isset($this->_headers[$j][$i])) {
                    $this->_headers[$j][$i] = '';
                }
            }
        }

        for ($j = 0; $j < count($this->_headers); $j++) {
            for ($i = 0; $i < count($this->_headers[$j]); $i++) {
                if ($this->_strlen($this->_headers[$j][$i]) <
                    $this->_cell_lengths[$i]
                ) {
                    $this->_headers[$j][$i] =
                        $this->_strpad($this->_headers[$j][$i],
                            $this->_cell_lengths[$i],
                            ' ',
                            $this->_col_align[$i]);
                }
            }
        }

        $vertical = $this->_border['vertical'];
        $row_begin = $this->_borderVisibility['left']
            ? $vertical . str_repeat(' ', $this->_padding)
            : '';
        $row_end = $this->_borderVisibility['right']
            ? str_repeat(' ', $this->_padding) . $vertical
            : '';
        $implode_char = str_repeat(' ', $this->_padding) . $vertical
            . str_repeat(' ', $this->_padding);

        $separator = $this->_getSeparator();
        if (!empty($separator) && $this->_borderVisibility['top']) {
            $return[] = $separator;
        }
        for ($j = 0; $j < count($this->_headers); $j++) {
            $return[] = $row_begin
                . implode($implode_char, $this->_headers[$j]) . $row_end;
        }

        return implode(PHP_EOL, $return);
    }
819670
public function monthly($month = '*', $day = 1, $hour = 0, $minute = 0)
    {
        if (\is_string($hour)) {
            $parts = explode(':', $hour);
            $hour = $parts[0];
            $minute = $parts[1] ?? '0';
        }
        $c = $this->validateCronSequence($minute, $hour, $day, $month);

        return $this->at("{$c['minute']} {$c['hour']} {$c['day']} {$c['month']} *");
    }
1219801
public static function getMonthEnd($month = -1, $year = -1)
    {
        if ($month == -1) {
            $month = date("n");
        }
        if ($year == -1) {
            $year = date("Y");
        }

        //gets the number of days in the actual month
        $tempTime = mktime(0, 0, 0, $month, 1, $year);
        $tempTime = date("t", $tempTime);

        return mktime(23, 59, 59, $month, $tempTime, $year);
    }
666023
private function getMonthTitle( int $monthnum = 0 ) {
		global $wp_locale;
		$date_format = get_option('date_format');
		if ( in_array( $date_format, [
			'DATE_COOKIE',
			'DATE_RFC822',
			'DATE_RFC850',
			'DATE_RFC1036',
			'DATE_RFC1123',
			'DATE_RFC2822',
			'DATE_RSS'
		] ) ) {
			$month_format = 'M';
		} elseif ( in_array( $date_format, [
			'DATE_ATOM',
			'DATE_ISO8601',
			'DATE_RFC3339',
			'DATE_W3C'
		] ) ) {
			$month_format = 'm';
		} else {
			preg_match('/(^|[^\\\\]+)(F|m|M|n)/', str_replace( '\\\\', '', $date_format ), $m );
			if ( isset( $m[2] ) ) {
				$month_format = $m[2];
			} else {
				$month_format = 'F';
			}
		}

		switch ( $month_format ) {
			case 'F' :
				$month = $wp_locale->get_month( $monthnum );
				break;
			case 'M' :
				$month = $wp_locale->get_month_abbrev( $wp_locale->get_month( $monthnum ) );
				break;
			default :
				$month = $monthnum;
				break;
		}

		return $month;
	}
653785
public function header()
    {
        $gotObjList             = OObject::validateSession();
        $now                    = new \DateTime();
        $scripts                = $gotObjList->resources;
        $gotObjList->lastAccess = $now->format("Y-m-d H:i:s");

        if ($scripts) {
            $view = new ViewModel();
            $view->setTemplate('zf3-graphic-object-templating/main/got-header.twig');
            $view->setVariable('scripts',
                ['css' => $scripts['css'] ?? [], 'js' => $scripts['js'] ?? [], 'font' => $scripts['fonts'] ?? []]);
            $renduHtml = $this->_twigRender->render($view);
            return $renduHtml;
        }
        return false;
    }
341010
protected function get_month_data() {
        $date = $this->related['type']->timestamp_to_date_array($this->calendar->time);
        $monthtime = $this->related['type']->convert_to_gregorian($date['year'], $date['month'], 1);

        return make_timestamp($monthtime['year'], $monthtime['month']);
    }