dolphindb 2.0.1035 → 2.0.1100

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/index.js CHANGED
@@ -8,7 +8,7 @@ import { concat, assert, inspect, typed_array_to_buffer, connect_websocket, Lock
8
8
  import { t } from './i18n/index.js';
9
9
  import { DdbDecimal128Serializor } from './data-types/decimal-128.js';
10
10
  import { BigInt128Array } from './shared/bigint-128-array.js';
11
- import { is_decimal_type, is_decimal_null_value } from './shared/utils/decimal-type.js';
11
+ import { is_decimal_type, is_decimal_null_value, get_duration_unit } from './shared/utils.js';
12
12
  import { nulls, DdbChartType, DdbDurationUnit, DdbForm, DdbFunctionType, DdbType } from './shared/constants.js';
13
13
  export * from './shared/constants.js';
14
14
  // Simulate other TypedArray behavior in nodejs
@@ -1466,7 +1466,7 @@ export function format(type, value, le, options = {}) {
1466
1466
  }
1467
1467
  case DdbType.duration: {
1468
1468
  const { data, unit } = value;
1469
- const str = `${data}${DdbDurationUnit[unit]}`;
1469
+ const str = `${data}${DdbDurationUnit[unit] ?? get_duration_unit(unit)}`;
1470
1470
  return options.colors ? str.magenta : str;
1471
1471
  }
1472
1472
  case DdbType.decimal32: