| __construct( DateTime $start, int $firstWeekday = Day::MONDAY) | ||
| DateTime | getBegin() | from PeriodAbstract |
| DateTime | getEnd() | from PeriodAbstract |
| bool |
contains( DateTime $date)
Checks if the given period is contained in the current period |
from PeriodAbstract |
| bool |
equals( PeriodInterface $period)
Checks if a period is equals to an other |
from PeriodAbstract |
| bool |
includes( PeriodInterface $period, bool $strict = true)
Returns true if the period include the other period given as argument |
from PeriodAbstract |
| boolean |
containsEvent( EventInterface $event)
Returns if $event is during this period. |
from PeriodAbstract |
| string |
format( string $format)
Format the period to a string |
from PeriodAbstract |
| bool |
isCurrent()
Returns if the current period is the current one |
from PeriodAbstract |
| PeriodInterface |
getNext()
Gets the next period of the same type |
from PeriodAbstract |
| PeriodInterface |
getPrevious()
Gets the previous period of the same type |
from PeriodAbstract |
| setFirstWeekday( int $firstWeekday) | from PeriodAbstract | |
| int | getFirstWeekday() | from PeriodAbstract |
| DatePeriod |
getDatePeriod()
Returns the period as a DatePeriod |
|
| array<Day> |
getDays()
Returns a Day array |
|
| Range |
getExtendedMonth()
Returns a Range period begining at the first day of first week of this month, and ending at the last day of the last week of this month. |
|
| DateTime |
getFirstDayOfFirstWeek()
Returns the first day of the first week of month. |
|
| DateTime |
getLastDayOfLastWeek()
Returns the last day of last week of month First day of week is configurable via self::setFirstWeekday() |
|
| DateTime |
getFirstMonday()
Returns the monday of the first week of this month. |
|
| DateTime |
getLastSunday()
Returns the sunday of the last week of this month. |
|
| Week | current() | |
|
next()
{@inheritDoc} |
||
|
key()
{@inheritDoc} |
||
|
valid()
{@inheritDoc} |
||
|
rewind()
{@inheritDoc} |
||
| string |
__toString()
Returns the month name (probably in english) |
|
| static bool | isValid( DateTime $start) | |
| static DateInterval |
getDateInterval()
Returns a \DateInterval equivalent to the period |
public
__construct( DateTime $start, int $firstWeekday = Day::MONDAY)
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Exceptions |
|
||||||
public DateTime
getBegin()
public DateTime
getEnd()
public bool
contains( DateTime $date)
Checks if the given period is contained in the current period
| Parameters |
|
|||
|---|---|---|---|---|
| Return Value |
|
|||
public bool
equals( PeriodInterface $period)
public bool
includes( PeriodInterface $period, bool $strict = true)
Returns true if the period include the other period given as argument
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Return Value |
|
||||||
public boolean
containsEvent( EventInterface $event)
Returns if $event is during this period.
Non strict. Must return true if : * Event is during period * Period is during event * Event begin is during Period * Event end is during Period
| Parameters |
|
|||
|---|---|---|---|---|
| Return Value |
|
|||
public string
format( string $format)
Format the period to a string
| Parameters |
|
|||
|---|---|---|---|---|
| Return Value |
|
|||
public bool
isCurrent()
Returns if the current period is the current one
| Return Value |
|
|---|
public PeriodInterface
getNext()
public PeriodInterface
getPrevious()
public
setFirstWeekday( int $firstWeekday)
| Parameters |
|
|||
|---|---|---|---|---|
public int
getFirstWeekday()
| Return Value |
|
|---|
public DatePeriod
getDatePeriod()
public array<Day>
getDays()
Returns a Day array
| Return Value |
|
|---|
public Range
getExtendedMonth()
Returns a Range period begining at the first day of first week of this month, and ending at the last day of the last week of this month.
| Return Value |
|
|---|
public DateTime
getFirstDayOfFirstWeek()
Returns the first day of the first week of month.
First day of week is configurable via self::setFirstWeekday()
| Return Value |
|
|---|
public DateTime
getLastDayOfLastWeek()
Returns the last day of last week of month First day of week is configurable via self::setFirstWeekday()
| Return Value |
|
|---|
public DateTime
getFirstMonday()
public DateTime
getLastSunday()
public Week
current()
public
next()
{@inheritDoc}
public
key()
{@inheritDoc}
public
valid()
{@inheritDoc}
public
rewind()
{@inheritDoc}
public string
__toString()
Returns the month name (probably in english)
| Return Value |
|
|---|
static public bool
isValid( DateTime $start)
| Parameters |
|
|||
|---|---|---|---|---|
| Return Value |
|
|||
static public DateInterval
getDateInterval()