/
githubmirror
/
strapi
Обзор
Документация
Войти
/
githubmirror
/
strapi
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/core/utils/src/primitives/dates.ts
9 строк
273 B
Alexandre Bodin
chore: remove template configuration from utils
09 мар 2024, 15:08
09 мар 2024, 15:08
8d53207
Код
Авторство
О чём код?
// Using timestamp (milliseconds) to be sure it is unique // + converting timestamp to base 36 for better readibility const timestampCode = (date?: Date) => { const referDate = date ?? new Date(); return referDate.getTime().toString(36); }; export { timestampCode };