mol_time_all 1.1.150 → 1.1.153

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.
package/node.deps.json CHANGED
@@ -1 +1 @@
1
- {"files":["LICENSE","README.md","lang.lang.tree","mam.jam.js","mam.ts","package.json","sandbox.config.json","tsconfig.json","tsfmt.json","yarn.lock","mol/CNAME","mol/CODE_OF_CONDUCT.md","mol/CONTRIBUTING.md","mol/LICENSE","mol/index.html","mol/mol.meta.tree","mol/readme.md","mol/time/readme.md","mol/time/base/base.ts","mol/time/duration/duration.ts","mol/time/duration/readme.md","mol/fail/fail.ts","mol/time/moment/moment.ts","mol/time/moment/readme.md","mol/time/interval/interval.ts","mol/time/interval/readme.md","mol/time/all/all.meta.tree","mol/time/all/package.json"],"mods":{},"deps_in":{"mol/time":{"mol/time/all":-9007199254740991,"mol/time/moment":-9007199254740991,"mol/time/duration":-9007199254740991,"mol/time/base":-9007199254740991,"mol/time/interval":-9007199254740991},"mol":{"mol/time":-9007199254740991,"mol/fail":-9007199254740991},"":{"mol":-9007199254740991},"mol/time/moment":{"mol/time/all":-9000,"mol/time/interval":-2},"mol/time/duration":{"mol/time/moment":-2,"mol/time/all":-9000,"mol/time/interval":-2},"mol/time/base":{"mol/time/duration":-1,"mol/time/moment":-1,"mol/time/interval":-1},"mol/fail":{"mol/time/moment":-2},"mol/time/interval":{"mol/time/all":-9000}},"deps_out":{"mol/time/all":{"mol/time":-9007199254740991,"mol/time/moment":-9000,"mol/time/duration":-9000,"mol/time/interval":-9000},"mol/time":{"mol":-9007199254740991},"mol":{"":-9007199254740991},"mol/time/moment":{"mol/time":-9007199254740991,"mol/time/duration":-2,"mol/fail":-2,"mol/time/base":-1},"mol/time/duration":{"mol/time":-9007199254740991,"mol/time/base":-1},"mol/time/base":{"mol/time":-9007199254740991},"mol/fail":{"mol":-9007199254740991},"mol/time/interval":{"mol/time":-9007199254740991,"mol/time/moment":-2,"mol/time/duration":-2,"mol/time/base":-1}},"sloc":{"LICENSE":113,"md":737,"tree":34,"js":10,"ts":586,"json":90,"lock":939,"CNAME":1,"html":1},"deps":{"mol/time/all":{"..":-9007199254740991,"/mol/time/moment":-9000,"/mol/time/duration":-9000,"/mol/time/interval":-9000},"mol/time":{"..":-9007199254740991},"mol":{"..":-9007199254740991},"":{},"mol/time/moment":{"..":-9007199254740991,"/mol/time/moment/weekdays":-1,"/mol/time/moment/config":-1,"/mol/time/duration/config":-2,"/mol/fail":-2,"/mol/time/moment":-1,"/mol/time/base":-1,"/mol/time/duration":-2,"/mol/time/moment/patterns":-4},"mol/time/duration":{"..":-9007199254740991,"/mol/time/duration/config":-1,"/mol/time/duration":-1,"/mol/time/base":-1},"mol/time/base":{"..":-9007199254740991,"/mol/time/base":-1},"mol/fail":{"..":-9007199254740991,"/mol/fail":-1},"mol/time/interval":{"..":-9007199254740991,"/mol/time/interval/config":-1,"/mol/time/moment/config":-2,"/mol/time/duration/config":-2,"/mol/time/interval":-1,"/mol/time/base":-1,"/mol/time/duration":-2,"/mol/time/moment":-2}}}
1
+ {"files":["LICENSE","README.md","lang.lang.tree","mam.jam.js","mam.ts","package.json","sandbox.config.json","tsconfig.json","tsfmt.json","yarn.lock","mol/CNAME","mol/CODE_OF_CONDUCT.md","mol/CONTRIBUTING.md","mol/LICENSE","mol/index.html","mol/mol.meta.tree","mol/readme.md","mol/time/readme.md","mol/time/base/base.ts","mol/time/duration/duration.ts","mol/time/duration/readme.md","mol/fail/fail.ts","mol/time/moment/moment.ts","mol/time/moment/readme.md","mol/time/interval/interval.ts","mol/time/interval/readme.md","mol/time/all/all.meta.tree","mol/time/all/package.json"],"mods":{},"deps_in":{"mol/time":{"mol/time/all":-9007199254740991,"mol/time/moment":-9007199254740991,"mol/time/duration":-9007199254740991,"mol/time/base":-9007199254740991,"mol/time/interval":-9007199254740991},"mol":{"mol/time":-9007199254740991,"mol/fail":-9007199254740991},"":{"mol":-9007199254740991},"mol/time/moment":{"mol/time/all":-9000,"mol/time/interval":-2},"mol/time/duration":{"mol/time/moment":-2,"mol/time/all":-9000,"mol/time/interval":-2},"mol/time/base":{"mol/time/duration":-1,"mol/time/moment":-1,"mol/time/interval":-1},"mol/fail":{"mol/time/moment":-2},"mol/time/interval":{"mol/time/all":-9000}},"deps_out":{"mol/time/all":{"mol/time":-9007199254740991,"mol/time/moment":-9000,"mol/time/duration":-9000,"mol/time/interval":-9000},"mol/time":{"mol":-9007199254740991},"mol":{"":-9007199254740991},"mol/time/moment":{"mol/time":-9007199254740991,"mol/time/duration":-2,"mol/fail":-2,"mol/time/base":-1},"mol/time/duration":{"mol/time":-9007199254740991,"mol/time/base":-1},"mol/time/base":{"mol/time":-9007199254740991},"mol/fail":{"mol":-9007199254740991},"mol/time/interval":{"mol/time":-9007199254740991,"mol/time/moment":-2,"mol/time/duration":-2,"mol/time/base":-1}},"sloc":{"LICENSE":113,"md":736,"tree":34,"js":10,"ts":586,"json":90,"lock":939,"CNAME":1,"html":1},"deps":{"mol/time/all":{"..":-9007199254740991,"/mol/time/moment":-9000,"/mol/time/duration":-9000,"/mol/time/interval":-9000},"mol/time":{"..":-9007199254740991},"mol":{"..":-9007199254740991},"":{},"mol/time/moment":{"..":-9007199254740991,"/mol/time/moment/weekdays":-1,"/mol/time/moment/config":-1,"/mol/time/duration/config":-2,"/mol/fail":-2,"/mol/time/moment":-1,"/mol/time/base":-1,"/mol/time/duration":-2,"/mol/time/moment/patterns":-4},"mol/time/duration":{"..":-9007199254740991,"/mol/time/duration/config":-1,"/mol/time/duration":-1,"/mol/time/base":-1},"mol/time/base":{"..":-9007199254740991,"/mol/time/base":-1},"mol/fail":{"..":-9007199254740991,"/mol/fail":-1},"mol/time/interval":{"..":-9007199254740991,"/mol/time/interval/config":-1,"/mol/time/moment/config":-2,"/mol/time/duration/config":-2,"/mol/time/interval":-1,"/mol/time/base":-1,"/mol/time/duration":-2,"/mol/time/moment":-2}}}
package/node.test.js CHANGED
@@ -885,6 +885,12 @@ var $;
885
885
  //mol/type/assert/assert.ts
886
886
  ;
887
887
  "use strict";
888
+ //mol/type/equals/equals.test.ts
889
+ ;
890
+ "use strict";
891
+ //mol/type/equals/equals.ts
892
+ ;
893
+ "use strict";
888
894
  //mol/type/partial/deep/deep.test.ts
889
895
  ;
890
896
  "use strict";
@@ -1421,83 +1427,6 @@ var $;
1421
1427
  ;
1422
1428
  "use strict";
1423
1429
  var $;
1424
- (function ($) {
1425
- $mol_test({
1426
- 'parse and serial'() {
1427
- $mol_assert_equal(new $mol_time_moment('2014').toString(), '2014');
1428
- $mol_assert_equal(new $mol_time_moment('2014-01').toString(), '2014-01');
1429
- $mol_assert_equal(new $mol_time_moment('2014-01-02').toString(), '2014-01-02');
1430
- $mol_assert_equal(new $mol_time_moment('2014-01-02T03').toString(), '2014-01-02T03');
1431
- $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04').toString(), '2014-01-02T03:04');
1432
- $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04:05').toString(), '2014-01-02T03:04:05');
1433
- $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04:05.006').toString(), '2014-01-02T03:04:05.006');
1434
- $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04:05.006Z').toString(), '2014-01-02T03:04:05.006+00:00');
1435
- $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04:05.006+07:00').toString(), '2014-01-02T03:04:05.006+07:00');
1436
- $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04:05+07:08').toString(), '2014-01-02T03:04:05+07:08');
1437
- $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04+07:08').toString(), '2014-01-02T03:04+07:08');
1438
- $mol_assert_equal(new $mol_time_moment('T03:04+07:08').toString(), 'T03:04+07:08');
1439
- $mol_assert_equal(new $mol_time_moment('T03:04:05').toString(), 'T03:04:05');
1440
- $mol_assert_equal(new $mol_time_moment('T03:04').toString(), 'T03:04');
1441
- $mol_assert_equal(new $mol_time_moment('T03').toString(), 'T03');
1442
- },
1443
- 'format simple'() {
1444
- $mol_assert_equal(new $mol_time_moment('2014-01-02T01:02:03.000000').toString('AD YY-M-D h:m:s'), '21 14-1-2 1:2:3');
1445
- },
1446
- 'format padded'() {
1447
- $mol_assert_equal(new $mol_time_moment('2014-01-02T01:02:03.000').toString('YYYY-MM-DD hh:mm:ss'), '2014-01-02 01:02:03');
1448
- },
1449
- 'format time zone'() {
1450
- $mol_assert_equal(new $mol_time_moment('2014-01-02T01:02:03+05:00').toString('Z'), '+05:00');
1451
- },
1452
- 'format names'() {
1453
- $mol_assert_ok(new $mol_time_moment('2014-01-02T01:02:03.000').toString('Month Mon | WeekDay WD'));
1454
- },
1455
- 'shifting'() {
1456
- $mol_assert_equal(new $mol_time_moment('T15:54:58.243+03:00').shift({}).toString(), 'T15:54:58.243+03:00');
1457
- $mol_assert_equal(new $mol_time_moment('2014-01-02').shift('P1Y').toString(), '2015-01-02');
1458
- $mol_assert_equal(new $mol_time_moment('2014-01-02').shift('P12M').toString(), '2015-01-02');
1459
- $mol_assert_equal(new $mol_time_moment('2014-01-02').shift('P365D').toString(), '2015-01-02');
1460
- $mol_assert_equal(new $mol_time_moment('2014-01-02').shift('PT8760h').toString(), '2015-01-02');
1461
- $mol_assert_equal(new $mol_time_moment('2014-01').shift('PT8760h').toString(), '2015-01');
1462
- $mol_assert_equal(new $mol_time_moment('2014-01').shift('PT-8760h').toString(), '2013-01');
1463
- },
1464
- 'normalization'() {
1465
- $mol_assert_equal(new $mol_time_moment({ year: 2015, month: 6, day: 34 }).normal.toString(), '2015-08-04');
1466
- },
1467
- 'iso week day'() {
1468
- $mol_assert_equal(new $mol_time_moment('2017-09-17').weekday, $mol_time_moment_weekdays.sunday);
1469
- $mol_assert_equal(new $mol_time_moment('2017-09-18').weekday, $mol_time_moment_weekdays.monday);
1470
- },
1471
- 'change offset'() {
1472
- $mol_assert_equal(new $mol_time_moment('2021-04-10 +03:00').toOffset('Z').toString(), '2021-04-09T21:00:00+00:00');
1473
- },
1474
- 'comparison'() {
1475
- const iso = '2021-01-02T03:04:05.678+09:10';
1476
- $mol_assert_like(new $mol_time_moment(iso), new $mol_time_moment(iso));
1477
- },
1478
- });
1479
- })($ || ($ = {}));
1480
- //mol/time/moment/moment.test.ts
1481
- ;
1482
- "use strict";
1483
- var $;
1484
- (function ($) {
1485
- $mol_test({
1486
- 'triplets'() {
1487
- $mol_assert_equal(new $mol_time_interval('2015-01-01/P1M').end.toString(), '2015-02-01');
1488
- $mol_assert_equal(new $mol_time_interval('P1M/2015-02-01').start.toString(), '2015-01-01');
1489
- $mol_assert_equal(new $mol_time_interval('2015-01-01/2015-02-01').duration.toString(), 'PT2678400S');
1490
- },
1491
- 'comparison'() {
1492
- const iso = '2021-01-02/2022-03-04';
1493
- $mol_assert_like(new $mol_time_interval(iso), new $mol_time_interval(iso));
1494
- },
1495
- });
1496
- })($ || ($ = {}));
1497
- //mol/time/interval/interval.test.ts
1498
- ;
1499
- "use strict";
1500
- var $;
1501
1430
  (function ($) {
1502
1431
  function $mol_log3_area_lazy(event) {
1503
1432
  const self = this;
@@ -1564,52 +1493,6 @@ var $;
1564
1493
  ;
1565
1494
  "use strict";
1566
1495
  var $;
1567
- (function ($) {
1568
- function $mol_env() {
1569
- return {};
1570
- }
1571
- $.$mol_env = $mol_env;
1572
- })($ || ($ = {}));
1573
- //mol/env/env.ts
1574
- ;
1575
- "use strict";
1576
- var $;
1577
- (function ($) {
1578
- $.$mol_env = function $mol_env() {
1579
- return this.process.env;
1580
- };
1581
- })($ || ($ = {}));
1582
- //mol/env/env.node.ts
1583
- ;
1584
- "use strict";
1585
- var $;
1586
- (function ($) {
1587
- function $mol_exec(dir, command, ...args) {
1588
- let [app, ...args0] = command.split(' ');
1589
- args = [...args0, ...args];
1590
- this.$mol_log3_come({
1591
- place: '$mol_exec',
1592
- dir: $node.path.relative('', dir),
1593
- message: 'Run',
1594
- command: `${app} ${args.join(' ')}`,
1595
- });
1596
- var res = $node['child_process'].spawnSync(app, args, {
1597
- cwd: $node.path.resolve(dir),
1598
- shell: true,
1599
- env: this.$mol_env(),
1600
- });
1601
- if (res.status || res.error)
1602
- return $mol_fail(res.error || new Error(res.stderr.toString()));
1603
- if (!res.stdout)
1604
- res.stdout = Buffer.from([]);
1605
- return res;
1606
- }
1607
- $.$mol_exec = $mol_exec;
1608
- })($ || ($ = {}));
1609
- //mol/exec/exec.node.ts
1610
- ;
1611
- "use strict";
1612
- var $;
1613
1496
  (function ($) {
1614
1497
  $.$mol_ambient_ref = Symbol('$mol_ambient_ref');
1615
1498
  function $mol_ambient(overrides) {
@@ -2242,9 +2125,126 @@ var $;
2242
2125
  //mol/tree/tree.ts
2243
2126
  ;
2244
2127
  "use strict";
2245
- //mol/type/equals/equals.test.ts
2128
+ var $;
2129
+ (function ($) {
2130
+ function $mol_env() {
2131
+ return {};
2132
+ }
2133
+ $.$mol_env = $mol_env;
2134
+ })($ || ($ = {}));
2135
+ //mol/env/env.ts
2246
2136
  ;
2247
2137
  "use strict";
2248
- //mol/type/equals/equals.ts
2138
+ var $;
2139
+ (function ($) {
2140
+ $.$mol_env = function $mol_env() {
2141
+ return this.process.env;
2142
+ };
2143
+ })($ || ($ = {}));
2144
+ //mol/env/env.node.ts
2145
+ ;
2146
+ "use strict";
2147
+ var $;
2148
+ (function ($) {
2149
+ function $mol_exec(dir, command, ...args) {
2150
+ let [app, ...args0] = command.split(' ');
2151
+ args = [...args0, ...args];
2152
+ this.$mol_log3_come({
2153
+ place: '$mol_exec',
2154
+ dir: $node.path.relative('', dir),
2155
+ message: 'Run',
2156
+ command: `${app} ${args.join(' ')}`,
2157
+ });
2158
+ var res = $node['child_process'].spawnSync(app, args, {
2159
+ cwd: $node.path.resolve(dir),
2160
+ shell: true,
2161
+ env: this.$mol_env(),
2162
+ });
2163
+ if (res.status || res.error)
2164
+ return $mol_fail(res.error || new Error(res.stderr.toString()));
2165
+ if (!res.stdout)
2166
+ res.stdout = Buffer.from([]);
2167
+ return res;
2168
+ }
2169
+ $.$mol_exec = $mol_exec;
2170
+ })($ || ($ = {}));
2171
+ //mol/exec/exec.node.ts
2172
+ ;
2173
+ "use strict";
2174
+ var $;
2175
+ (function ($) {
2176
+ $mol_test({
2177
+ 'parse and serial'() {
2178
+ $mol_assert_equal(new $mol_time_moment('2014').toString(), '2014');
2179
+ $mol_assert_equal(new $mol_time_moment('2014-01').toString(), '2014-01');
2180
+ $mol_assert_equal(new $mol_time_moment('2014-01-02').toString(), '2014-01-02');
2181
+ $mol_assert_equal(new $mol_time_moment('2014-01-02T03').toString(), '2014-01-02T03');
2182
+ $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04').toString(), '2014-01-02T03:04');
2183
+ $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04:05').toString(), '2014-01-02T03:04:05');
2184
+ $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04:05.006').toString(), '2014-01-02T03:04:05.006');
2185
+ $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04:05.006Z').toString(), '2014-01-02T03:04:05.006+00:00');
2186
+ $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04:05.006+07:00').toString(), '2014-01-02T03:04:05.006+07:00');
2187
+ $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04:05+07:08').toString(), '2014-01-02T03:04:05+07:08');
2188
+ $mol_assert_equal(new $mol_time_moment('2014-01-02T03:04+07:08').toString(), '2014-01-02T03:04+07:08');
2189
+ $mol_assert_equal(new $mol_time_moment('T03:04+07:08').toString(), 'T03:04+07:08');
2190
+ $mol_assert_equal(new $mol_time_moment('T03:04:05').toString(), 'T03:04:05');
2191
+ $mol_assert_equal(new $mol_time_moment('T03:04').toString(), 'T03:04');
2192
+ $mol_assert_equal(new $mol_time_moment('T03').toString(), 'T03');
2193
+ },
2194
+ 'format simple'() {
2195
+ $mol_assert_equal(new $mol_time_moment('2014-01-02T01:02:03.000000').toString('AD YY-M-D h:m:s'), '21 14-1-2 1:2:3');
2196
+ },
2197
+ 'format padded'() {
2198
+ $mol_assert_equal(new $mol_time_moment('2014-01-02T01:02:03.000').toString('YYYY-MM-DD hh:mm:ss'), '2014-01-02 01:02:03');
2199
+ },
2200
+ 'format time zone'() {
2201
+ $mol_assert_equal(new $mol_time_moment('2014-01-02T01:02:03+05:00').toString('Z'), '+05:00');
2202
+ },
2203
+ 'format names'() {
2204
+ $mol_assert_ok(new $mol_time_moment('2014-01-02T01:02:03.000').toString('Month Mon | WeekDay WD'));
2205
+ },
2206
+ 'shifting'() {
2207
+ $mol_assert_equal(new $mol_time_moment('T15:54:58.243+03:00').shift({}).toString(), 'T15:54:58.243+03:00');
2208
+ $mol_assert_equal(new $mol_time_moment('2014-01-02').shift('P1Y').toString(), '2015-01-02');
2209
+ $mol_assert_equal(new $mol_time_moment('2014-01-02').shift('P12M').toString(), '2015-01-02');
2210
+ $mol_assert_equal(new $mol_time_moment('2014-01-02').shift('P365D').toString(), '2015-01-02');
2211
+ $mol_assert_equal(new $mol_time_moment('2014-01-02').shift('PT8760h').toString(), '2015-01-02');
2212
+ $mol_assert_equal(new $mol_time_moment('2014-01').shift('PT8760h').toString(), '2015-01');
2213
+ $mol_assert_equal(new $mol_time_moment('2014-01').shift('PT-8760h').toString(), '2013-01');
2214
+ },
2215
+ 'normalization'() {
2216
+ $mol_assert_equal(new $mol_time_moment({ year: 2015, month: 6, day: 34 }).normal.toString(), '2015-08-04');
2217
+ },
2218
+ 'iso week day'() {
2219
+ $mol_assert_equal(new $mol_time_moment('2017-09-17').weekday, $mol_time_moment_weekdays.sunday);
2220
+ $mol_assert_equal(new $mol_time_moment('2017-09-18').weekday, $mol_time_moment_weekdays.monday);
2221
+ },
2222
+ 'change offset'() {
2223
+ $mol_assert_equal(new $mol_time_moment('2021-04-10 +03:00').toOffset('Z').toString(), '2021-04-09T21:00:00+00:00');
2224
+ },
2225
+ 'comparison'() {
2226
+ const iso = '2021-01-02T03:04:05.678+09:10';
2227
+ $mol_assert_like(new $mol_time_moment(iso), new $mol_time_moment(iso));
2228
+ },
2229
+ });
2230
+ })($ || ($ = {}));
2231
+ //mol/time/moment/moment.test.ts
2232
+ ;
2233
+ "use strict";
2234
+ var $;
2235
+ (function ($) {
2236
+ $mol_test({
2237
+ 'triplets'() {
2238
+ $mol_assert_equal(new $mol_time_interval('2015-01-01/P1M').end.toString(), '2015-02-01');
2239
+ $mol_assert_equal(new $mol_time_interval('P1M/2015-02-01').start.toString(), '2015-01-01');
2240
+ $mol_assert_equal(new $mol_time_interval('2015-01-01/2015-02-01').duration.toString(), 'PT2678400S');
2241
+ },
2242
+ 'comparison'() {
2243
+ const iso = '2021-01-02/2022-03-04';
2244
+ $mol_assert_like(new $mol_time_interval(iso), new $mol_time_interval(iso));
2245
+ },
2246
+ });
2247
+ })($ || ($ = {}));
2248
+ //mol/time/interval/interval.test.ts
2249
2249
 
2250
2250
  //# sourceMappingURL=node.test.js.map