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

yiming-liao / logry / 19127807272

06 Nov 2025 03:07AM UTC coverage: 95.603% (-0.3%) from 95.92%
19127807272

push

github

yiming-liao
chore(release): bump version to 2.0.0

448 of 505 branches covered (88.71%)

Branch coverage included in aggregate %.

3901 of 4044 relevant lines covered (96.46%)

3.88 hits per line

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

72.73
/src/modules/normalizers/utils/build-timestamp-string.ts
1
const pad = (n: number) => n.toString().padStart(2, "0");
1✔
2
const pad3 = (n: number) => n.toString().padStart(3, "0");
1✔
3

1✔
4
export const buildTimestampString = ({
1✔
5
  timestamp,
6✔
6
  useUTC = false,
6✔
7
  showTimeOnly = false,
6✔
8
}: {
6✔
9
  timestamp: number;
6✔
10
  useUTC: boolean;
6✔
11
  showTimeOnly: boolean;
6✔
12
}): string => {
6✔
13
  const date = new Date(timestamp);
6✔
14

6✔
15
  const get = useUTC
6✔
16
    ? {
6!
17
        y: date.getUTCFullYear(),
×
18
        m: pad(date.getUTCMonth() + 1),
×
19
        d: pad(date.getUTCDate()),
×
20
        h: pad(date.getUTCHours()),
×
21
        min: pad(date.getUTCMinutes()),
×
22
        s: pad(date.getUTCSeconds()),
×
23
        ms: pad3(date.getUTCMilliseconds()),
×
24
      }
×
25
    : {
6✔
26
        y: date.getFullYear(),
6✔
27
        m: pad(date.getMonth() + 1),
6✔
28
        d: pad(date.getDate()),
6✔
29
        h: pad(date.getHours()),
6✔
30
        min: pad(date.getMinutes()),
6✔
31
        s: pad(date.getSeconds()),
6✔
32
        ms: pad3(date.getMilliseconds()),
6✔
33
      };
6✔
34

6✔
35
  if (showTimeOnly) {
6✔
36
    return `${get.h}:${get.min}:${get.s}.${get.ms}`;
6✔
37
  }
6✔
38
  return `${get.y}-${get.m}-${get.d} ${get.h}:${get.min}:${get.s}.${get.ms}`;
×
39
};
×
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