MCPcopy Index your code
hub / github.com/reactjs/server-components-demo / randomDateBetween

Function randomDateBetween

scripts/seed.js:24–28  ·  view source on GitHub ↗
(start, end)

Source from the content-addressed store, hash-verified

22const startOfThisYear = startOfYear(now);
23// Thanks, https://stackoverflow.com/a/9035732
24function randomDateBetween(start, end) {
25 return new Date(
26 start.getTime() + Math.random() * (end.getTime() - start.getTime())
27 );
28}
29
30const dropTableStatement = 'DROP TABLE IF EXISTS notes;';
31const createTableStatement = `CREATE TABLE notes (

Callers 1

seed.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected