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

mozilla / blurts-server / 04f25c66-c843-4e18-9ce3-3add34af612d

pending completion
04f25c66-c843-4e18-9ce3-3add34af612d

push

circleci

GitHub
Merge pull request #2723 from mozilla/MNTOR-1015/breach-table-view

278 of 1063 branches covered (26.15%)

Branch coverage included in aggregate %.

13 of 13 new or added lines in 4 files covered. (100.0%)

948 of 2889 relevant lines covered (32.81%)

5.19 hits per line

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

0.0
/src/utils/date-time.js
1
import { getLocale } from './fluent.js'
2

3
/**
4
* Format date according to app locale
5
* @param {string} str - The ISO date string.
6
* @param {object} [args] - Format options. Defaults to medium-size UTC date without time.
7
*
8
* See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options MDN Intl.DateTimeFormat} for available options
9
*/
10
function formatDate (str, args) {
11
  const date = new Date(str)
×
12
  const options = args || { year: 'numeric', month: 'short', day: '2-digit', timeZone: 'UTC' }
×
13

14
  return date.toLocaleString(getLocale(), options)
×
15
}
16

17
export { formatDate }
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