MCPcopy Create free account
hub / github.com/flyfloor/react-component / date2Obj

Function date2Obj

component/util/date.js:6–11  ·  view source on GitHub ↗
(date)

Source from the content-addressed store, hash-verified

4const BEGIN_DATE = `${BEGIN_YEAR}-${BEGIN_MONTH}-${BEGIN_MONTH}`;
5
6const date2Obj = (date) => {
7 let year = date.getFullYear() || BEGIN_YEAR;
8 let month = date.getMonth() + 1 || BEGIN_MONTH;
9 let day = date.getDate() || BEGIN_DAY;
10 return {year, month, day};
11};
12
13const dateStr2Obj = (dateStr, options={ begin: null, end: null}) => {
14 let begin = options.begin || BEGIN_DATE,

Callers 2

dateStr2ObjFunction · 0.70
date2DateStrFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…