Documentation

Helpers
in package

Table of Contents

Methods

daysPerYear()  : int|string
daysPerYear.
isLastDayOfMonth()  : bool
isLastDayOfMonth.

Methods

daysPerYear()

daysPerYear.

public static daysPerYear(int|string $year[, int|string $basis = 0 ]) : int|string

Returns the number of days in a specified year, as defined by the "basis" value

Parameters
$year : int|string

The year against which we're testing

$basis : int|string = 0

The type of day count: 0 or omitted US (NASD) 360 1 Actual (365 or 366 in a leap year) 2 360 3 365 4 European 360

Return values
int|string

Result, or a string containing an error

isLastDayOfMonth()

isLastDayOfMonth.

public static isLastDayOfMonth(DateTimeInterface $date) : bool

Returns a boolean TRUE/FALSE indicating if this date is the last date of the month

Parameters
$date : DateTimeInterface

The date for testing

Return values
bool

        
On this page

Search results