MCPcopy Index your code
hub / github.com/react-dates/react-dates / toLocalizedDateString

Function toLocalizedDateString

src/utils/toLocalizedDateString.js:7–12  ·  view source on GitHub ↗
(date, currentFormat)

Source from the content-addressed store, hash-verified

5import { DISPLAY_FORMAT } from '../constants';
6
7export default function toLocalizedDateString(date, currentFormat) {
8 const dateObj = moment.isMoment(date) ? date : toMomentObject(date, currentFormat);
9 if (!dateObj) return null;
10
11 return dateObj.format(DISPLAY_FORMAT);
12}

Callers 3

getDateStringMethod · 0.85
getDateStringMethod · 0.85

Calls 1

toMomentObjectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…