/
alt3rmann
/
graphql-engine
Обзор
Документация
Войти
/
alt3rmann
/
graphql-engine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
docs/src/components/Timestamp.jsx
11 строк
396 B
Rob Dominguez
docs: feature index restructure
15 мар 2023, 19:36
15 мар 2023, 19:36
9664600
Код
Авторство
О чём код?
import React from 'react'; // This component is for the GraphQL Schema quickstart wherein we create a coupon that needs a timestamp in the future for the expiration date. const Timestamp = () => { const date = new Date(); date.setDate(date.getDate() + 14); date.setHours(0, 0, 0, 0); return <code>{date.toISOString().slice(0, 19).replace('T', ' ')}</code>; }; export default Timestamp;