Skip to content

Commit

Permalink
fix: DateWrapper fails on first day of month (#1342)
Browse files Browse the repository at this point in the history
Closes #1341
  • Loading branch information
ethanalvizo authored Jun 1, 2023
1 parent 9ecbf52 commit a4677eb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/jsapi-utils/src/TableUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2459,13 +2459,18 @@ describe('makeValue', () => {
now.getMonth(),
now.getDate()
);
const yesterdayDate = DateUtils.makeDateWrapper(
dh,
'America/New_York',
const yesterday = new Date(
now.getFullYear(),
now.getMonth(),
now.getDate() - 1
);
const yesterdayDate = DateUtils.makeDateWrapper(
dh,
'America/New_York',
yesterday.getFullYear(),
yesterday.getMonth(),
yesterday.getDate()
);
testMakeValue(
'io.deephaven.db.tables.utils.DBDateTime',
'today',
Expand Down

0 comments on commit a4677eb

Please sign in to comment.