@@ -8,15 +8,13 @@ class DateStringSet {
8
8
valueOf ( ) {
9
9
return new Date ( this . value ) . getTime ( ) ;
10
10
}
11
+ [ Symbol . for ( "can.serialize" ) ] ( ) {
12
+ return this . value ;
13
+ }
11
14
}
12
15
13
- canReflect . assignSymbols ( DateStringSet . prototype , {
14
- "can.serialize" : function ( ) {
15
- return this . value ;
16
- }
17
- } ) ;
18
-
19
16
const DateString = {
17
+ [ Symbol . for ( "can.new" ) ] : function ( v ) { return v ; } ,
20
18
[ Symbol . for ( "can.SetType" ) ] : DateStringSet
21
19
} ;
22
20
@@ -30,13 +28,13 @@ const queryLogic = new QueryLogic(Todo);
30
28
31
29
const filter = queryLogic . filterMembers (
32
30
{ filter : { date : { $gt : "Wed Apr 04 2018 10:00:00 GMT-0500 (CDT)" } } } ,
33
- [ { id : 1 , name : "grab coffee " , date : "Wed Apr 03 2018 10:00:00 GMT-0500 (CDT)" } ,
34
- { id : 2 , name : "finish these docs " , date : "Thurs Apr 05 2018 10:00:00 GMT-0500 (CDT)" } ,
35
- { id : 3 , name : "Learn CanJS " , date : "Thurs Apr 05 2017 10:00:00 GMT-0500 (CDT)" } ]
36
- ) ;
31
+ [ { id : 1 , name : "Learn CanJS " , date : "Thurs Apr 05 2017 10:00:00 GMT-0500 (CDT)" } ,
32
+ { id : 2 , name : "grab coffee " , date : "Wed Apr 03 2018 10:00:00 GMT-0500 (CDT)" } ,
33
+ { id : 3 , name : "finish these docs " , date : "Thurs Apr 05 2018 10:00:00 GMT-0500 (CDT)" } ]
34
+ ) ;
37
35
38
- console . log ( filter ) ; //-> {
36
+ console . log ( filter ) ; //-> [ {
39
37
// id: 2,
40
38
// name: "finish these docs",
41
39
// date: "Wed Apr 05 2018 10:00:00 GMT-0500 (CDT)"
42
- // }
40
+ // }]
0 commit comments