tpmkms_4wp 9.3.0-beta.9 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/common/animals.instance.json +0 -65
  2. package/common/animals.js +2 -3
  3. package/common/animals.test.json +1607 -1
  4. package/common/articles.js +2 -4
  5. package/common/asking.js +21 -5
  6. package/common/avatar.js +2 -2
  7. package/common/characters.js +2 -2
  8. package/common/colors.instance.json +28 -70
  9. package/common/colors.js +2 -2
  10. package/common/comparable.instance.json +0 -15
  11. package/common/comparable.js +2 -2
  12. package/common/concept.js +1 -2
  13. package/common/conjunction.js +3 -5
  14. package/common/countable.js +2 -14
  15. package/common/crew.instance.json +0 -130
  16. package/common/crew.js +2 -2
  17. package/common/currency.js +2 -3
  18. package/common/dateTimeSelectors.instance.json +175 -0
  19. package/common/dateTimeSelectors.js +168 -0
  20. package/common/dateTimeSelectors.test.json +85622 -0
  21. package/common/dates.instance.json +538 -506
  22. package/common/dates.js +112 -15
  23. package/common/dates.test.json +11021 -514
  24. package/common/dialogues.js +8 -47
  25. package/common/dimension.instance.json +0 -5
  26. package/common/dimension.js +4 -4
  27. package/common/edible.instance.json +56 -160
  28. package/common/edible.js +2 -2
  29. package/common/emotions.instance.json +0 -5
  30. package/common/emotions.js +2 -2
  31. package/common/errors.js +3 -0
  32. package/common/evaluate.js +2 -2
  33. package/common/events.js +1 -2
  34. package/common/fastfood.instance.json +262 -713
  35. package/common/fastfood.js +2 -4
  36. package/common/formulas.instance.json +0 -5
  37. package/common/formulas.js +3 -1
  38. package/common/gdefaults.js +2 -3
  39. package/common/help.js +2 -2
  40. package/common/helpers/dateTimeSelectors.js +198 -0
  41. package/common/helpers/dialogues.js +11 -8
  42. package/common/helpers/properties.js +2 -2
  43. package/common/helpers.js +22 -63
  44. package/common/hierarchy.js +12 -13
  45. package/common/javascript.js +2 -3
  46. package/common/kirk.instance.json +0 -5
  47. package/common/kirk.js +2 -3
  48. package/common/length.instance.json +0 -75
  49. package/common/length.js +2 -3
  50. package/common/listener.js +3 -1
  51. package/common/math.instance.json +0 -5
  52. package/common/math.js +2 -3
  53. package/common/menus.instance.json +0 -35
  54. package/common/menus.js +3 -1
  55. package/common/meta.js +4 -5
  56. package/common/nameable.js +3 -1
  57. package/common/negation.js +2 -2
  58. package/common/numbers.js +6 -3
  59. package/common/ordering.instance.json +0 -10
  60. package/common/ordering.js +2 -3
  61. package/common/ordinals.js +2 -3
  62. package/common/people.instance.json +0 -40
  63. package/common/people.js +2 -3
  64. package/common/percentages.js +2 -3
  65. package/common/percentages.test.json +57 -11
  66. package/common/pipboy.instance.json +84 -85
  67. package/common/pipboy.js +1 -1
  68. package/common/pokemon.instance.json +0 -65
  69. package/common/pokemon.js +1 -2
  70. package/common/pos.js +2 -2
  71. package/common/pressure.instance.json +0 -20
  72. package/common/pressure.js +2 -2
  73. package/common/properties.instance.json +0 -5
  74. package/common/properties.js +11 -13
  75. package/common/punctuation.js +2 -2
  76. package/common/reminders.instance.json +145 -35
  77. package/common/reminders.js +264 -82
  78. package/common/reminders.test.json +69523 -970
  79. package/common/reports.instance.json +2 -12
  80. package/common/reports.js +1 -1
  81. package/common/scorekeeper.js +2 -2
  82. package/common/sdefaults.js +1 -1
  83. package/common/self.js +1 -1
  84. package/common/sizeable.js +2 -2
  85. package/common/spock.instance.json +0 -5
  86. package/common/spock.js +1 -1
  87. package/common/stgame.js +1 -1
  88. package/common/stm.js +1 -1
  89. package/common/tell.js +2 -2
  90. package/common/temperature.instance.json +84 -20
  91. package/common/temperature.js +2 -2
  92. package/common/tester.js +0 -1
  93. package/common/testing.js +0 -1
  94. package/common/time.js +10 -8
  95. package/common/time.test.json +73 -119
  96. package/common/tokenize.js +1 -1
  97. package/common/ui.instance.json +0 -5
  98. package/common/ui.js +1 -1
  99. package/common/weight.instance.json +0 -60
  100. package/common/weight.js +2 -2
  101. package/common/wp.instance.json +56 -70
  102. package/common/wp.js +1 -3
  103. package/common/yesno.js +2 -2
  104. package/main.js +2 -0
  105. package/package.json +8 -4
  106. package/common/helpers/reminders.js +0 -48
@@ -360,11 +360,6 @@
360
360
  "theAble",
361
361
  false
362
362
  ],
363
- [
364
- "evaluate",
365
- "verb",
366
- false
367
- ],
368
363
  [
369
364
  "every",
370
365
  "article",
@@ -1625,11 +1620,6 @@
1625
1620
  "theAble",
1626
1621
  false
1627
1622
  ],
1628
- [
1629
- "evaluate",
1630
- "verb",
1631
- false
1632
- ],
1633
1623
  [
1634
1624
  "every",
1635
1625
  "article",
@@ -3317,11 +3307,6 @@
3317
3307
  "theAble",
3318
3308
  false
3319
3309
  ],
3320
- [
3321
- "evaluate",
3322
- "verb",
3323
- false
3324
- ],
3325
3310
  [
3326
3311
  "every",
3327
3312
  "article",
@@ -5097,11 +5082,6 @@
5097
5082
  "theAble",
5098
5083
  false
5099
5084
  ],
5100
- [
5101
- "evaluate",
5102
- "verb",
5103
- false
5104
- ],
5105
5085
  [
5106
5086
  "every",
5107
5087
  "article",
@@ -6912,11 +6892,6 @@
6912
6892
  "theAble",
6913
6893
  false
6914
6894
  ],
6915
- [
6916
- "evaluate",
6917
- "verb",
6918
- false
6919
- ],
6920
6895
  [
6921
6896
  "every",
6922
6897
  "article",
@@ -8569,11 +8544,6 @@
8569
8544
  "theAble",
8570
8545
  false
8571
8546
  ],
8572
- [
8573
- "evaluate",
8574
- "verb",
8575
- false
8576
- ],
8577
8547
  [
8578
8548
  "every",
8579
8549
  "article",
@@ -10292,11 +10262,6 @@
10292
10262
  "theAble",
10293
10263
  false
10294
10264
  ],
10295
- [
10296
- "evaluate",
10297
- "verb",
10298
- false
10299
- ],
10300
10265
  [
10301
10266
  "every",
10302
10267
  "article",
@@ -12183,11 +12148,6 @@
12183
12148
  "theAble",
12184
12149
  false
12185
12150
  ],
12186
- [
12187
- "evaluate",
12188
- "verb",
12189
- false
12190
- ],
12191
12151
  [
12192
12152
  "every",
12193
12153
  "article",
@@ -14123,11 +14083,6 @@
14123
14083
  "theAble",
14124
14084
  false
14125
14085
  ],
14126
- [
14127
- "evaluate",
14128
- "verb",
14129
- false
14130
- ],
14131
14086
  [
14132
14087
  "every",
14133
14088
  "article",
@@ -16076,11 +16031,6 @@
16076
16031
  "theAble",
16077
16032
  false
16078
16033
  ],
16079
- [
16080
- "evaluate",
16081
- "verb",
16082
- false
16083
- ],
16084
16034
  [
16085
16035
  "every",
16086
16036
  "article",
@@ -17818,11 +17768,6 @@
17818
17768
  "theAble",
17819
17769
  false
17820
17770
  ],
17821
- [
17822
- "evaluate",
17823
- "verb",
17824
- false
17825
- ],
17826
17771
  [
17827
17772
  "every",
17828
17773
  "article",
@@ -19626,11 +19571,6 @@
19626
19571
  "theAble",
19627
19572
  false
19628
19573
  ],
19629
- [
19630
- "evaluate",
19631
- "verb",
19632
- false
19633
- ],
19634
19574
  [
19635
19575
  "every",
19636
19576
  "article",
@@ -21615,11 +21555,6 @@
21615
21555
  "theAble",
21616
21556
  false
21617
21557
  ],
21618
- [
21619
- "evaluate",
21620
- "verb",
21621
- false
21622
- ],
21623
21558
  [
21624
21559
  "every",
21625
21560
  "article",
@@ -23645,11 +23580,6 @@
23645
23580
  "theAble",
23646
23581
  false
23647
23582
  ],
23648
- [
23649
- "evaluate",
23650
- "verb",
23651
- false
23652
- ],
23653
23583
  [
23654
23584
  "every",
23655
23585
  "article",
@@ -25688,11 +25618,6 @@
25688
25618
  "theAble",
25689
25619
  false
25690
25620
  ],
25691
- [
25692
- "evaluate",
25693
- "verb",
25694
- false
25695
- ],
25696
25621
  [
25697
25622
  "every",
25698
25623
  "article",
@@ -27546,11 +27471,6 @@
27546
27471
  "theAble",
27547
27472
  false
27548
27473
  ],
27549
- [
27550
- "evaluate",
27551
- "verb",
27552
- false
27553
- ],
27554
27474
  [
27555
27475
  "every",
27556
27476
  "article",
@@ -29347,11 +29267,6 @@
29347
29267
  "theAble",
29348
29268
  false
29349
29269
  ],
29350
- [
29351
- "evaluate",
29352
- "verb",
29353
- false
29354
- ],
29355
29270
  [
29356
29271
  "every",
29357
29272
  "article",
@@ -31687,11 +31602,6 @@
31687
31602
  "theAble",
31688
31603
  false
31689
31604
  ],
31690
- [
31691
- "evaluate",
31692
- "verb",
31693
- false
31694
- ],
31695
31605
  [
31696
31606
  "every",
31697
31607
  "article",
@@ -33392,11 +33302,6 @@
33392
33302
  "theAble",
33393
33303
  false
33394
33304
  ],
33395
- [
33396
- "evaluate",
33397
- "verb",
33398
- false
33399
- ],
33400
33305
  [
33401
33306
  "every",
33402
33307
  "article",
@@ -36070,11 +35975,6 @@
36070
35975
  "theAble",
36071
35976
  false
36072
35977
  ],
36073
- [
36074
- "evaluate",
36075
- "verb",
36076
- false
36077
- ],
36078
35978
  [
36079
35979
  "every",
36080
35980
  "article",
@@ -37956,11 +37856,6 @@
37956
37856
  "theAble",
37957
37857
  false
37958
37858
  ],
37959
- [
37960
- "evaluate",
37961
- "verb",
37962
- false
37963
- ],
37964
37859
  [
37965
37860
  "every",
37966
37861
  "article",
@@ -39852,11 +39747,6 @@
39852
39747
  "theAble",
39853
39748
  false
39854
39749
  ],
39855
- [
39856
- "evaluate",
39857
- "verb",
39858
- false
39859
- ],
39860
39750
  [
39861
39751
  "every",
39862
39752
  "article",
@@ -41697,11 +41587,6 @@
41697
41587
  "theAble",
41698
41588
  false
41699
41589
  ],
41700
- [
41701
- "evaluate",
41702
- "verb",
41703
- false
41704
- ],
41705
41590
  [
41706
41591
  "every",
41707
41592
  "article",
@@ -43542,11 +43427,6 @@
43542
43427
  "theAble",
43543
43428
  false
43544
43429
  ],
43545
- [
43546
- "evaluate",
43547
- "verb",
43548
- false
43549
- ],
43550
43430
  [
43551
43431
  "every",
43552
43432
  "article",
@@ -45387,11 +45267,6 @@
45387
45267
  "theAble",
45388
45268
  false
45389
45269
  ],
45390
- [
45391
- "evaluate",
45392
- "verb",
45393
- false
45394
- ],
45395
45270
  [
45396
45271
  "every",
45397
45272
  "article",
@@ -48836,11 +48711,6 @@
48836
48711
  "theAble",
48837
48712
  false
48838
48713
  ],
48839
- [
48840
- "evaluate",
48841
- "verb",
48842
- false
48843
- ],
48844
48714
  [
48845
48715
  "every",
48846
48716
  "article",
package/common/crew.js CHANGED
@@ -83,8 +83,8 @@ knowledgeModule( {
83
83
  name: './crew.test.json',
84
84
  contents: crew_tests,
85
85
  checks: {
86
- context: defaultContextCheck(),
87
- },
86
+ context: [defaultContextCheck()],
87
+ }
88
88
  },
89
89
  template: {
90
90
  template,
@@ -121,8 +121,7 @@ knowledgeModule({
121
121
  name: './currency.test.json',
122
122
  contents: currency_tests,
123
123
  checks: {
124
- context: defaultContextCheck(),
125
- },
126
-
124
+ context: [defaultContextCheck()],
125
+ },
127
126
  },
128
127
  })
@@ -0,0 +1,175 @@
1
+ {
2
+ "configs": [
3
+ {
4
+ "operators": [
5
+ "([dateTimeSelector] (onDate) (atTime))",
6
+ "((day_dates/*) [dayOfMonth|of] (month_dates/*))",
7
+ "((day_dates/*) [dayAfterDate|after] (afterDateValue_dates/*))"
8
+ ],
9
+ "bridges": [
10
+ {
11
+ "id": "dayOfMonth",
12
+ "after": [
13
+ "article"
14
+ ],
15
+ "isA": [
16
+ "onDateValue_dates"
17
+ ],
18
+ "before": [
19
+ "verb",
20
+ "onDate_dates"
21
+ ],
22
+ "bridge": "{ ...next(operator), day: before[0], month: after[0], operator: operator, interpolate: '${day} ${operator} ${month}' }",
23
+ "check": [
24
+ "day",
25
+ "month"
26
+ ]
27
+ },
28
+ {
29
+ "id": "dayAfterDate",
30
+ "after": [
31
+ "article",
32
+ "monthDayYear_dates"
33
+ ],
34
+ "isA": [
35
+ "onDateValue_dates"
36
+ ],
37
+ "before": [
38
+ "verb",
39
+ "afterDate_dates"
40
+ ],
41
+ "bridge": "{ ...next(operator), day: before[0], after: after[0], operator: operator, interpolate: '${day} ${operator} ${after}' }",
42
+ "check": [
43
+ "day",
44
+ "after"
45
+ ]
46
+ },
47
+ {
48
+ "id": "dateTimeSelector",
49
+ "after": [
50
+ "preposition"
51
+ ],
52
+ "before": [
53
+ "verb"
54
+ ],
55
+ "convolution": true,
56
+ "children": [
57
+ "onDate_dates",
58
+ "atTime",
59
+ "date_dates"
60
+ ],
61
+ "bridge": "{ ...next(operator), date: after[0], time: after[1], interpolate: '${date} ${time}' }",
62
+ "check": [
63
+ "time",
64
+ "date"
65
+ ]
66
+ }
67
+ ],
68
+ "semantics": [
69
+ {
70
+ "match": "({context, isA}) => context.evaluate && onOrIs('dayAfterDate', context)",
71
+ "apply": "async ({context, isProcess, isTest, kms, isA, e}) => {\n try {\n const now = kms.time.api.now()\n const date = afterOrIs('dayAfterDate', context)\n const afterISO = (await e(date.after)).evalue\n const day_ordinal = date.day.day_ordinal\n const ordinal = date.day.ordinal.value\n context.evalue = dateTimeSelectors_helpers.getNthWeekdayAfterDate(afterISO, day_ordinal, ordinal)\n } catch ( e ) {\n context.evalue = `Implement instatiate for this type of date. See the dateTimeSelectors KM ${where()}. ${e}`\n }\n }"
72
+ },
73
+ {
74
+ "match": "({context, isA}) => context.evaluate && onOrIs('dayOfMonth', context)",
75
+ "apply": "({context, isProcess, isTest, kms, isA}) => {\n try {\n const now = kms.time.api.now()\n const date = onOrIs('dayOfMonth', context)\n context.evalue = dateTimeSelectors_helpers.getNthDayOfMonth(removeDatesSuffix(date.day.value), date.day.ordinal.value || 1, removeDatesSuffix(date.month.value), now)\n } catch ( e ) {\n context.evalue = `Implement instatiate for this type of date. See the dateTimeSelectors KM ${where()}. ${e}`\n }\n }"
76
+ },
77
+ {
78
+ "match": "({context, isA}) => {\n if (!context.evaluate) {\n return false\n }\n if (isA(context.marker, 'onDateValue_dates')) {\n return true\n }\n if (isA(context.marker, 'dateTimeSelector')) {\n return true\n }\n }",
79
+ "apply": "({context, isProcess, isTest, kms, isA}) => {\n context.evalue = instantiate(kms, isA, isProcess || isTest || context.isTest, context)\n }"
80
+ }
81
+ ],
82
+ "hierarchy": [
83
+ [
84
+ "day_dates",
85
+ "orderable"
86
+ ]
87
+ ]
88
+ }
89
+ ],
90
+ "resultss": [
91
+ {
92
+ "extraConfig": true,
93
+ "operators": [
94
+ "([dateTimeSelector] (onDate) (atTime))",
95
+ "((day_dates/*) [dayOfMonth|of] (month_dates/*))",
96
+ "((day_dates/*) [dayAfterDate|after] (afterDateValue_dates/*))"
97
+ ],
98
+ "bridges": [
99
+ {
100
+ "id": "dayOfMonth",
101
+ "after": [
102
+ "article"
103
+ ],
104
+ "isA": [
105
+ "onDateValue_dates"
106
+ ],
107
+ "before": [
108
+ "verb",
109
+ "onDate_dates"
110
+ ],
111
+ "bridge": "{ ...next(operator), day: before[0], month: after[0], operator: operator, interpolate: '${day} ${operator} ${month}' }",
112
+ "check": [
113
+ "day",
114
+ "month"
115
+ ]
116
+ },
117
+ {
118
+ "id": "dayAfterDate",
119
+ "after": [
120
+ "article",
121
+ "monthDayYear_dates"
122
+ ],
123
+ "isA": [
124
+ "onDateValue_dates"
125
+ ],
126
+ "before": [
127
+ "verb",
128
+ "afterDate_dates"
129
+ ],
130
+ "bridge": "{ ...next(operator), day: before[0], after: after[0], operator: operator, interpolate: '${day} ${operator} ${after}' }",
131
+ "check": [
132
+ "day",
133
+ "after"
134
+ ]
135
+ },
136
+ {
137
+ "id": "dateTimeSelector",
138
+ "after": [
139
+ "preposition"
140
+ ],
141
+ "before": [
142
+ "verb"
143
+ ],
144
+ "convolution": true,
145
+ "children": [
146
+ "onDate_dates",
147
+ "atTime",
148
+ "date_dates"
149
+ ],
150
+ "bridge": "{ ...next(operator), date: after[0], time: after[1], interpolate: '${date} ${time}' }",
151
+ "check": [
152
+ "time",
153
+ "date"
154
+ ]
155
+ }
156
+ ],
157
+ "semantics": [
158
+ {},
159
+ {},
160
+ {}
161
+ ],
162
+ "hierarchy": [
163
+ [
164
+ "day_dates",
165
+ "orderable"
166
+ ]
167
+ ]
168
+ }
169
+ ],
170
+ "fragments": [],
171
+ "semantics": [],
172
+ "associations": [],
173
+ "summaries": [],
174
+ "learned_contextual_priorities": []
175
+ }
@@ -0,0 +1,168 @@
1
+ const { knowledgeModule, where } = require('./runtime').theprogrammablemind
2
+ const { defaultContextCheck } = require('./helpers')
3
+ const dateTimeSelectors_tests = require('./dateTimeSelectors.test.json')
4
+ const dateTimeSelectors_instance = require('./dateTimeSelectors.instance.json')
5
+ const dates = require('./dates')
6
+ const time = require('./time')
7
+ const dateTimeSelectors_helpers = require('./helpers/dateTimeSelectors')
8
+
9
+ /*
10
+ friday instead
11
+ change it to friday
12
+ delete it
13
+ make it friday instead
14
+ 2 sundays from now
15
+ 2 sundays from last tuesday
16
+ the sunday after july 1st
17
+ the first tuesday after july 1st
18
+ the first tuesday on or after july 1st
19
+ the last tuesday of every month
20
+ the last tuesday of every third month
21
+ monday at 10 am
22
+ 10 am
23
+ first monday after jan 1
24
+ */
25
+
26
+ function instantiate(kms, isA, isProcessOrTest, dateTimeSelector) {
27
+ try {
28
+ const now = kms.time.api.now()
29
+ return dateTimeSelectors_helpers.instantiate(isA, now, dateTimeSelector)
30
+ } catch ( e ) {
31
+ return `Implement instatiate for this type of date. See the dateTimeSelectors KM ${where()}`
32
+ }
33
+ }
34
+
35
+ function removeDatesSuffix(str) {
36
+ if (str.endsWith('_dates')) {
37
+ return str.slice(0, -6); // Removes last 6 characters
38
+ }
39
+ return str;
40
+ }
41
+
42
+ function onOrIs(marker, context) {
43
+ if (context.marker === marker) {
44
+ return context
45
+ }
46
+ if (context.marker === 'onDate_dates' && context.date?.marker == marker) {
47
+ return context.date
48
+ }
49
+ }
50
+
51
+ function afterOrIs(marker, context) {
52
+ if (context.marker === marker) {
53
+ return context
54
+ }
55
+ if (context.marker === 'onDate_dates' && context.date?.marker == marker) {
56
+ return context.date
57
+ }
58
+ }
59
+
60
+ const template = {
61
+ configs: [
62
+ {
63
+ operators: [
64
+ "([dateTimeSelector] (onDate) (atTime))",
65
+ "((day_dates/*) [dayOfMonth|of] (month_dates/*))",
66
+ "((day_dates/*) [dayAfterDate|after] (afterDateValue_dates/*))",
67
+ ],
68
+ bridges: [
69
+ {
70
+ id: 'dayOfMonth',
71
+ after: ['article'],
72
+ isA: ['onDateValue_dates'],
73
+ before: ['verb', 'onDate_dates'],
74
+ bridge: "{ ...next(operator), day: before[0], month: after[0], operator: operator, interpolate: '${day} ${operator} ${month}' }",
75
+ check: ['day', 'month'],
76
+ },
77
+ {
78
+ id: 'dayAfterDate',
79
+ after: ['article', 'monthDayYear_dates'],
80
+ isA: ['onDateValue_dates'],
81
+ before: ['verb', 'afterDate_dates'],
82
+ bridge: "{ ...next(operator), day: before[0], after: after[0], operator: operator, interpolate: '${day} ${operator} ${after}' }",
83
+ check: ['day', 'after'],
84
+ },
85
+ {
86
+ id: 'dateTimeSelector',
87
+ after: ['preposition'],
88
+ before: ['verb'],
89
+ convolution: true,
90
+ children: ['onDate_dates', 'atTime', 'date_dates'],
91
+ bridge: "{ ...next(operator), date: after[0], time: after[1], interpolate: '${date} ${time}' }",
92
+ check: ['time', 'date'],
93
+ },
94
+ ],
95
+ semantics: [
96
+ {
97
+ match: ({context, isA}) => context.evaluate && onOrIs('dayAfterDate', context),
98
+ apply: async ({context, isProcess, isTest, kms, isA, e}) => {
99
+ try {
100
+ const now = kms.time.api.now()
101
+ const date = afterOrIs('dayAfterDate', context)
102
+ const afterISO = (await e(date.after)).evalue
103
+ const day_ordinal = date.day.day_ordinal
104
+ const ordinal = date.day.ordinal.value
105
+ context.evalue = dateTimeSelectors_helpers.getNthWeekdayAfterDate(afterISO, day_ordinal, ordinal)
106
+ } catch ( e ) {
107
+ context.evalue = `Implement instatiate for this type of date. See the dateTimeSelectors KM ${where()}. ${e}`
108
+ }
109
+ },
110
+ },
111
+ {
112
+ match: ({context, isA}) => context.evaluate && onOrIs('dayOfMonth', context),
113
+ apply: ({context, isProcess, isTest, kms, isA}) => {
114
+ try {
115
+ const now = kms.time.api.now()
116
+ const date = onOrIs('dayOfMonth', context)
117
+ context.evalue = dateTimeSelectors_helpers.getNthDayOfMonth(removeDatesSuffix(date.day.value), date.day.ordinal.value || 1, removeDatesSuffix(date.month.value), now)
118
+ } catch ( e ) {
119
+ context.evalue = `Implement instatiate for this type of date. See the dateTimeSelectors KM ${where()}. ${e}`
120
+ }
121
+ },
122
+ },
123
+ {
124
+ match: ({context, isA}) => {
125
+ if (!context.evaluate) {
126
+ return false
127
+ }
128
+ if (isA(context.marker, 'onDateValue_dates')) {
129
+ return true
130
+ }
131
+ if (isA(context.marker, 'dateTimeSelector')) {
132
+ return true
133
+ }
134
+ },
135
+ apply: ({context, isProcess, isTest, kms, isA}) => {
136
+ context.evalue = instantiate(kms, isA, isProcess || isTest || context.isTest, context)
137
+ },
138
+ }
139
+ ],
140
+ hierarchy: [
141
+ ['day_dates', 'orderable'],
142
+ ],
143
+ },
144
+ ],
145
+ }
146
+
147
+ knowledgeModule( {
148
+ config: { name: 'dateTimeSelectors' },
149
+ includes: [time, dates],
150
+
151
+ module,
152
+ description: 'talking about date and time selectors',
153
+ test: {
154
+ name: './dateTimeSelectors.test.json',
155
+ contents: dateTimeSelectors_tests,
156
+ checks: {
157
+ context: [
158
+ // defaultContextCheck({ extra: ['date', 'time', 'response', 'after', 'day', 'month', 'year', 'evalue'] }),
159
+ defaultContextCheck({ extra: ['date', 'time', 'response', 'after', 'evalue'] }),
160
+ ],
161
+ }
162
+ },
163
+ template: {
164
+ template,
165
+ instance: dateTimeSelectors_instance,
166
+ },
167
+
168
+ })