• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wanasit / chrono / 14283595902

05 Apr 2025 04:08PM UTC coverage: 91.303% (-0.08%) from 91.378%
14283595902

push

github

Wanasit Tanakitrungruang
Fix/New: Reference date calculation base-on timezone adjusted instant

1474 of 1862 branches covered (79.16%)

39 of 44 new or added lines in 4 files covered. (88.64%)

2 existing lines in 1 file now uncovered.

4514 of 4944 relevant lines covered (91.3%)

407.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

55.56
/src/utils/dates.ts
1
import { ParsingComponents } from "../results";
2

3
/**
4
 * Imply (weakly update) the parsing component to the same day as the `target`.
5
 * @param component the component to be updated.
6
 * @param target the target date with timezone adjusted.
7
 */
8
export function implySimilarDate(component: ParsingComponents, target: Date) {
90✔
9
    component.imply("day", target.getDate());
9✔
10
    component.imply("month", target.getMonth() + 1);
9✔
11
    component.imply("year", target.getFullYear());
9✔
12
}
13

14
/**
15
 * Imply (weakly update) the parsing component to the same time as the `target`.
16
 * @param component the component to be updated.
17
 * @param target the target date with timezone adjusted.
18
 */
19
export function implySimilarTime(component: ParsingComponents, target: Date) {
90✔
NEW
20
    component.imply("hour", target.getHours());
×
NEW
21
    component.imply("minute", target.getMinutes());
×
NEW
22
    component.imply("second", target.getSeconds());
×
NEW
23
    component.imply("millisecond", target.getMilliseconds());
×
24
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc