프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$endDate | DateTimeImmutable | Period ending excluded date point. | |
$startDate | DateTimeImmutable | Period starting included date point. |
메소드 | 설명 | |
---|---|---|
__construct ( DateTimeInterfac\DateTimeInterface | string $startDate, DateTimeInterfac\DateTimeInterface | string $endDate ) | Create a new instance. | |
__set_state ( array $period ) | ||
__toString ( ) : string | String representation of a Period using ISO8601 Time interval format | |
abuts ( |
Tells whether two Period object abuts | |
add ( DateInterva\DateInterval | integer | string $interval ) : static | Returns a new Period object with an added interval | |
compareDuration ( |
Compares two Period objects according to their duration. | |
contains ( |
Tells whether the specified index is fully contained within the current Period object. | |
createFromDay ( DateTimeInterfac\DateTimeInterface | string $day ) : static | Create a Period object for a specific day | |
createFromDuration ( DateTimeInterfac\DateTimeInterface | string $startDate, mixed $interval ) : static | Create a Period object from a starting point and an interval. | |
createFromDurationBeforeEnd ( DateTimeInterfac\DateTimeInterface | string $endDate, mixed $interval ) : static | Create a Period object from a ending datepoint and an interval. | |
createFromMonth ( integer $year, integer $month ) : static | Create a Period object for a specific month | |
createFromQuarter ( integer $year, integer $quarter ) : static | Create a Period object for a specific quarter | |
createFromSemester ( integer $year, integer $semester ) : static | Create a Period object for a specific semester | |
createFromWeek ( integer $year, integer $week ) : static | Create a Period object for a specific week | |
createFromYear ( integer $year ) : static | Create a Period object for a specific Year | |
dateIntervalDiff ( |
Returns the difference between two Period objects expressed in \DateInterval | |
diff ( |
Computes the difference between two overlapsing Period objects | |
durationGreaterThan ( |
Tells whether the current Period object duration is greater than the submitted one. | |
durationLessThan ( |
Tells whether the current Period object duration is less than the submitted one. | |
endingOn ( DateTimeInterfac\DateTimeInterface | string $endDate ) : static | Returns a new Period object with a new ending date point. | |
gap ( |
Computes the gap between two Period objects. | |
getDateInterval ( ) : DateInterval | Returns the Period duration as a DateInterval object. | |
getDatePeriod ( DateInterva\DateInterval | integer | string $interval, integer $option ) : DatePeriod | Allows iteration over a set of dates and times, recurring at regular intervals, over the Period object. | |
getEndDate ( ) : DateTimeImmutable | Returns the ending datepoint. | |
getStartDate ( ) : DateTimeImmutable | Returns the starting date point. | |
getTimestampInterval ( ) : float | Returns the Period duration as expressed in seconds | |
intersect ( |
Computes the intersection between two Period objects. | |
isAfter ( |
Tells whether a Period is entirely after the specified index | |
isBefore ( |
Tells whether a Period is entirely before the specified index | |
jsonSerialize ( ) : DateTim\DateTime[] | implement JsonSerializable interface | |
merge ( |
Merges one or more Period objects to return a new Period object. | |
move ( DateInterva\DateInterval | integer | string $interval ) : static | Returns a new Period object where the datepoints are moved forwards or backward simultaneously by the given DateInterval | |
moveEndDate ( DateInterva\DateInterval | integer | string $interval ) : static | Returns a new Period object with a new ending date point moved forward or backward by the given interval | |
moveStartDate ( DateInterva\DateInterval | integer | string $interval ) : static | Returns a new Period object with a new starting date point moved forward or backward by the given interval | |
next ( DateInterva\DateInterval | integer | string $interval = null ) : static | Returns a new Period object adjacent to the current Period and starting with its ending datepoint. | |
overlaps ( |
Tells whether two Period objects overlaps. | |
previous ( DateInterva\DateInterval | integer | string $interval = null ) : static | Returns a new Period object adjacent to the current Period and ending with its starting datepoint. | |
sameDurationAs ( |
Tells whether the current Period object duration is equal to the submitted one | |
sameValueAs ( |
Tells whether two Period share the same datepoints. | |
split ( DateInterva\DateInterval | integer | string $interval ) : Generator | Split a Period by a given interval | |
startingOn ( DateTimeInterfac\DateTimeInterface | string $startDate ) : static | Returns a new Period object with a new included starting date point. | |
sub ( DateInterva\DateInterval | integer | string $interval ) : static | Returns a new Period object with a Removed interval | |
timestampIntervalDiff ( |
Returns the difference between two Period objects expressed in seconds | |
withDuration ( DateInterva\DateInterval | integer | string $interval ) : static | Returns a new Period object with a new ending date point. | |
withDurationBeforeEnd ( DateInterva\DateInterval | integer | string $interval ) : static | Returns a new Period object with a new starting date point. |
메소드 | 설명 | |
---|---|---|
containsDatePoint ( DateTimeInterfac\DateTimeInterface | string $datepoint ) : boolean | Tells whether a datepoint is fully contained within the current Period object. | |
containsPeriod ( |
Tells whether a Period object is fully contained within the current Period object. | |
convertDateTime ( DateTime $datetime ) : DateTimeImmutable | Convert a DateTime object into a DateTimeImmutable object | |
createFromDatepoints ( DateTimeInterfac\DateTimeInterface | string $datePoint1, DateTimeInterfac\DateTimeInterface | string $datePoint2 ) : |
Create a new instance given two datepoints | |
createFromYearInterval ( integer $interval, integer $year, integer $index ) : static | Create a Period object for a specific interval in a given year | |
filterDateInterval ( mixed $interval ) : DateInterval | Validate a DateInterval. | |
filterDatePoint ( DateTimeInterfac\DateTimeInterface | string $datetime ) : DateTimeImmutable | Validate a DateTime. | |
validateRange ( integer $value, integer $min, integer $max ) : integer | Validate a int according to a range. | |
validateYear ( integer $year ) : integer | Validate a year. |
public __construct ( DateTimeInterfac\DateTimeInterface | string $startDate, DateTimeInterfac\DateTimeInterface | string $endDate ) | ||
$startDate | DateTimeInterfac\DateTimeInterface | string | starting date point |
$endDate | DateTimeInterfac\DateTimeInterface | string | ending date point |
public __toString ( ) : string | ||
리턴 | string |
public compareDuration ( |
||
$period | ||
리턴 | integer |
protected containsDatePoint ( DateTimeInterfac\DateTimeInterface | string $datepoint ) : boolean | ||
$datepoint | DateTimeInterfac\DateTimeInterface | string | |
리턴 | boolean |
protected containsPeriod ( |
||
$period | ||
리턴 | boolean |
protected static convertDateTime ( DateTime $datetime ) : DateTimeImmutable | ||
$datetime | DateTime | |
리턴 | DateTimeImmutable |
protected static createFromDatepoints ( DateTimeInterfac\DateTimeInterface | string $datePoint1, DateTimeInterfac\DateTimeInterface | string $datePoint2 ) : |
||
$datePoint1 | DateTimeInterfac\DateTimeInterface | string | datepoint |
$datePoint2 | DateTimeInterfac\DateTimeInterface | string | datepoint |
리턴 |
public static createFromDay ( DateTimeInterfac\DateTimeInterface | string $day ) : static | ||
$day | DateTimeInterfac\DateTimeInterface | string | |
리턴 | static |
public static createFromDuration ( DateTimeInterfac\DateTimeInterface | string $startDate, mixed $interval ) : static | ||
$startDate | DateTimeInterfac\DateTimeInterface | string | The start date point |
$interval | mixed | The interval |
리턴 | static |
public static createFromDurationBeforeEnd ( DateTimeInterfac\DateTimeInterface | string $endDate, mixed $interval ) : static | ||
$endDate | DateTimeInterfac\DateTimeInterface | string | The start date point |
$interval | mixed | The interval |
리턴 | static |
public static createFromMonth ( integer $year, integer $month ) : static | ||
$year | integer | |
$month | integer | Month index from 1 to 12 |
리턴 | static |
public static createFromQuarter ( integer $year, integer $quarter ) : static | ||
$year | integer | |
$quarter | integer | Quarter Index from 1 to 4 |
리턴 | static |
public static createFromSemester ( integer $year, integer $semester ) : static | ||
$year | integer | |
$semester | integer | Semester Index from 1 to 2 |
리턴 | static |
public static createFromWeek ( integer $year, integer $week ) : static | ||
$year | integer | |
$week | integer | index from 1 to 53 |
리턴 | static |
public static createFromYear ( integer $year ) : static | ||
$year | integer | |
리턴 | static |
public dateIntervalDiff ( |
||
$period | ||
리턴 | DateInterval |
public diff ( |
||
$period | ||
리턴 |
public durationGreaterThan ( |
||
$period | ||
리턴 | boolean |
public durationLessThan ( |
||
$period | ||
리턴 | boolean |
protected static filterDateInterval ( mixed $interval ) : DateInterval | ||
$interval | mixed | The interval |
리턴 | DateInterval |
protected static filterDatePoint ( DateTimeInterfac\DateTimeInterface | string $datetime ) : DateTimeImmutable | ||
$datetime | DateTimeInterfac\DateTimeInterface | string | |
리턴 | DateTimeImmutable |
public gap ( |
||
$period | ||
리턴 | static |
public getDateInterval ( ) : DateInterval | ||
리턴 | DateInterval |
public getDatePeriod ( DateInterva\DateInterval | integer | string $interval, integer $option ) : DatePeriod | ||
$interval | DateInterva\DateInterval | integer | string | The interval |
$option | integer | can be set to DatePeriod::EXCLUDE_START_DATE to exclude the start date from the set of recurring dates within the period. |
리턴 | DatePeriod |
public getEndDate ( ) : DateTimeImmutable | ||
리턴 | DateTimeImmutable |
public getStartDate ( ) : DateTimeImmutable | ||
리턴 | DateTimeImmutable |
public getTimestampInterval ( ) : float | ||
리턴 | float |
public intersect ( |
||
$period | ||
리턴 | static |
public jsonSerialize ( ) : DateTim\DateTime[] | ||
리턴 | DateTim\DateTime[] |
public merge ( |
||
$arg | one or more Period objects | |
리턴 | static |
public moveEndDate ( DateInterva\DateInterval | integer | string $interval ) : static | ||
$interval | DateInterva\DateInterval | integer | string | The interval |
리턴 | static |
public moveStartDate ( DateInterva\DateInterval | integer | string $interval ) : static | ||
$interval | DateInterva\DateInterval | integer | string | The interval |
리턴 | static |
public sameDurationAs ( |
||
$period | ||
리턴 | boolean |
public sameValueAs ( |
||
$period | ||
리턴 | boolean |
public startingOn ( DateTimeInterfac\DateTimeInterface | string $startDate ) : static | ||
$startDate | DateTimeInterfac\DateTimeInterface | string | date point |
리턴 | static |
public timestampIntervalDiff ( |
||
$period | ||
리턴 | float |
protected static validateYear ( integer $year ) : integer | ||
$year | integer | |
리턴 | integer |
public withDuration ( DateInterva\DateInterval | integer | string $interval ) : static | ||
$interval | DateInterva\DateInterval | integer | string | The interval |
리턴 | static |
public withDurationBeforeEnd ( DateInterva\DateInterval | integer | string $interval ) : static | ||
$interval | DateInterva\DateInterval | integer | string | The interval |
리턴 | static |
protected DateTimeImmutable $endDate | ||
리턴 | DateTimeImmutable |