10 use MediaWikiCoversValidator;
19 $validate->validateDate( [],
$value,
true );
20 $this->assertEquals( $expected,
$value );
35 [
'1992-04',
'1992:04' ],
36 [
'1992-02-01',
'1992:02:01' ],
37 [
'2011-09-29',
'2011:09:29' ],
38 [
'1982-12-15T20:12',
'1982:12:15 20:12' ],
39 [
'1982-12-15T20:12Z',
'1982:12:15 20:12' ],
40 [
'1982-12-15T20:12+02:30',
'1982:12:15 22:42' ],
41 [
'1982-12-15T01:12-02:30',
'1982:12:14 22:42' ],
42 [
'1982-12-15T20:12:11',
'1982:12:15 20:12:11' ],
43 [
'1982-12-15T20:12:11Z',
'1982:12:15 20:12:11' ],
44 [
'1982-12-15T20:12:11+01:10',
'1982:12:15 21:22:11' ],
45 [
'2045-12-15T20:12:11',
'2045:12:15 20:12:11' ],
46 [
'1867-06-01T15:00:00',
'1867:06:01 15:00:00' ],
49 [
'2001-5-12', null ],
50 [
'2001-5-12TZ', null ],
51 [
'2001-05-12T15', null ],
52 [
'2001-12T15:13', null ],
testValidateDate( $value, $expected)
provideDates XMPValidate::validateDate
This contains some static methods for validating XMP properties.