@@ -12,7 +12,7 @@ import test from 'tape';
12
12
import parseNaturalDate from '../../common/utility/parseNaturalDate.js' ;
13
13
14
14
test ( 'parseNaturalDate' , function ( t ) {
15
- t . plan ( 15 ) ;
15
+ t . plan ( 21 ) ;
16
16
17
17
/* eslint-disable sort-keys */
18
18
const parseDateTests = [
@@ -24,10 +24,16 @@ test('parseNaturalDate', function (t) {
24
24
{ date : '1999-01-02' , expected : { year : '1999' , month : '01' , day : '02' } } ,
25
25
{ date : '1999-01' , expected : { year : '1999' , month : '01' , day : '' } } ,
26
26
{ date : '1999' , expected : { year : '1999' , month : '' , day : '' } } ,
27
+ { date : '1999-??-22' , expected : { year : '1999' , month : '' , day : '22' } } ,
28
+ { date : '????-??-22' , expected : { year : '' , month : '' , day : '22' } } ,
29
+ { date : '????-01-??' , expected : { year : '' , month : '01' , day : '' } } ,
27
30
28
31
// Y M D
29
32
{ date : '1999 01 02' , expected : { year : '1999' , month : '01' , day : '02' } } ,
30
33
{ date : '1999 01' , expected : { year : '1999' , month : '01' , day : '' } } ,
34
+ { date : '1999 ?? 22' , expected : { year : '1999' , month : '' , day : '22' } } ,
35
+ { date : '???? ?? 22' , expected : { year : '' , month : '' , day : '22' } } ,
36
+ { date : '???? 01 ??' , expected : { year : '' , month : '01' , day : '' } } ,
31
37
32
38
// Fullwidth numbers
33
39
{
0 commit comments