Skip to content

DateLike ​

DateLike = Date | string | number | { toJSDate: () => Date; }

Defined in: js-xbbg/src/index.ts (declaration: index.d.ts:44)

Date-like input accepted by xbbg JS surfaces (issue #317).

Mirrors the Python DateLike alias and the JS half of the date-acceptance matrix described in the issue:

  • Date — JavaScript Date (treated as a calendar date in UTC; the time portion is ignored when formatting to YYYYMMDD).
  • string — ISO 8601 ("2023-01-17", "2023-01-17T10:30:00", "2023-01-17T10:30:00-05:00") or Bloomberg-native ("20230117"). Ambiguous formats like "01/17/2023" are rejected.
  • number — epoch milliseconds.
  • duck-typed Luxon DateTime — anything implementing toJSDate().

Last updated:

xbbg is independent open-source software and is not affiliated with, endorsed by, sponsored by, or approved by Bloomberg Finance L.P.