Toggle navigation
Hot Examples
KO
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
검색
홈
Neos
Flow
Validation
Validator
DateTimeRangeValidator
PHP 클래스 Neos\Flow\Validation\Validator\DateTimeRangeValidator
상속:
extends
AbstractValidator
파일 보기
프로젝트 열기: neos/flow-development-collection
1 사용 예제들
보호된 프로퍼티들
프로퍼티
타입
설명
$supportedOptions
array
보호된 메소드들
메소드
설명
isValid
(
mixed
$dateTime
) :
void
Adds errors if the given DateTime does not match the set boundaries.
parseReferenceDate
(
string
$referenceDateString
) :
DateTime
Calculates a DateTime object from a given Time interval
메소드 상세
isValid()
보호된
메소드
latestDate and earliestDate may be each
,
/
or
/
, where
is an ISO 8601 duration and
or
or
may be 'now' or a PHP supported format. (1) In general, you are able to provide a timestamp or a timestamp with additional calculation. Calculations are done as described in ISO 8601 (2), with an introducing "P". P7MT2H30M for example mean a period of 7 months, 2 hours and 30 minutes (P introduces a period at all, while a following T introduces the time-section of a period. This is not at least in order not to confuse months and minutes, both represented as M). A period is separated from the timestamp with a forward slash "/". If the period follows the timestamp, that period is added to the timestamp; if the period precedes the timestamp, it's subtracted. The timestamp can be one of PHP's supported date formats (1), so also "now" is supported. Use cases: If you offer something that has to be manufactured and you ask for a delivery date, you might assure that this date is at least two weeks in advance; this could be done with the expression "now/P2W". If you have a library of ancient goods and want to track a production date that is at least 5 years ago, you can express it with "P5Y/now". Examples: If you want to test if a given date is at least five minutes ahead, use earliestDate: now/PT5M If you want to test if a given date was at least 10 days ago, use latestDate: P10D/now If you want to test if a given date is between two fix boundaries, just combine the latestDate and earliestDate-options: earliestDate: 2007-03-01T13:00:00Z latestDate: 2007-03-30T13:00:00Z Footnotes: http://de.php.net/manual/en/datetime.formats.compound.php (1) http://en.wikipedia.org/wiki/ISO_8601#Durations (2) http://en.wikipedia.org/wiki/ISO_8601#Time_intervals (3)
protected
isValid
(
mixed
$dateTime
) :
void
$dateTime
mixed
The DateTime value that should be validated
리턴
void
parseReferenceDate()
보호된
메소드
Calculates a DateTime object from a given Time interval
또한 보기:
isValid()
protected
parseReferenceDate
(
string
$referenceDateString
) :
DateTime
$referenceDateString
string
being one of
,
/
or
/
리턴
DateTime
프로퍼티 상세
$supportedOptions
보호되어 있는 프로퍼티
protected
array
$supportedOptions
리턴
array