dolphindb 2.0.1036 → 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/browser.js CHANGED
@@ -9,7 +9,7 @@ import { concat, assert, Lock, genid } from 'xshell/utils.browser.js';
9
9
  import { connect_websocket } from 'xshell/net.browser.js';
10
10
  import { t } from './i18n/index.js';
11
11
  import { DdbDecimal128Serializor } from './data-types/decimal-128.js';
12
- import { is_decimal_type, is_decimal_null_value } from './shared/utils/decimal-type.js';
12
+ import { is_decimal_type, is_decimal_null_value, get_duration_unit } from './shared/utils.js';
13
13
  import { nulls, DdbChartType, DdbDurationUnit, DdbForm, DdbFunctionType, DdbType } from './shared/constants.js';
14
14
  export * from './shared/constants.js';
15
15
  /** 可以表示所有 DolphinDB 数据库中的数据类型 Can represent data types in all DolphinDB databases */
@@ -1470,7 +1470,7 @@ export function format(type, value, le, options = {}) {
1470
1470
  }
1471
1471
  case DdbType.duration: {
1472
1472
  const { data, unit } = value;
1473
- const str = `${data}${DdbDurationUnit[unit]}`;
1473
+ const str = `${data}${DdbDurationUnit[unit] ?? get_duration_unit(unit)}`;
1474
1474
  return colors ? magenta(str) : str;
1475
1475
  }
1476
1476
  case DdbType.decimal32: