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

yiming-liao / logry / 15879517482

25 Jun 2025 02:43PM UTC coverage: 93.759% (-0.7%) from 94.477%
15879517482

push

github

yiming-liao
docs: revise copy and structure in architecture and examples

440 of 494 branches covered (89.07%)

Branch coverage included in aggregate %.

4157 of 4409 relevant lines covered (94.28%)

4.9 hits per line

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

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

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

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

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