MCPcopy Index your code
hub / github.com/postlight/parser / cleanDateString

Function cleanDateString

src/cleaners/date-published.js:19–26  ·  view source on GitHub ↗
(dateString)

Source from the content-addressed store, hash-verified

17} from './constants';
18
19export function cleanDateString(dateString) {
20 return (dateString.match(SPLIT_DATE_STRING) || [])
21 .join(' ')
22 .replace(TIME_MERIDIAN_DOTS_RE, 'm')
23 .replace(TIME_MERIDIAN_SPACE_RE, '$1 $2 $3')
24 .replace(CLEAN_DATE_STRING_RE, '$1')
25 .trim();
26}
27
28export function createDate(dateString, timezone, format) {
29 if (TIME_WITH_OFFSET_RE.test(dateString)) {

Callers 2

cleanDatePublishedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…