Skip to content

Commit a4677eb

Browse files
authored
fix: DateWrapper fails on first day of month (#1342)
Closes #1341
1 parent 9ecbf52 commit a4677eb

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

packages/jsapi-utils/src/TableUtils.test.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2459,13 +2459,18 @@ describe('makeValue', () => {
24592459
now.getMonth(),
24602460
now.getDate()
24612461
);
2462-
const yesterdayDate = DateUtils.makeDateWrapper(
2463-
dh,
2464-
'America/New_York',
2462+
const yesterday = new Date(
24652463
now.getFullYear(),
24662464
now.getMonth(),
24672465
now.getDate() - 1
24682466
);
2467+
const yesterdayDate = DateUtils.makeDateWrapper(
2468+
dh,
2469+
'America/New_York',
2470+
yesterday.getFullYear(),
2471+
yesterday.getMonth(),
2472+
yesterday.getDate()
2473+
);
24692474
testMakeValue(
24702475
'io.deephaven.db.tables.utils.DBDateTime',
24712476
'today',

0 commit comments

Comments
 (0)