/
githubmirror
/
dayjs
Обзор
Документация
Войти
/
githubmirror
/
dayjs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/plugin/isToday/index.js
9 строк
239 B
Konstantin Epishev
fix: add isToday, isTomorrow, isYesterday plugins (#857)
08 апр 2020, 12:00
Не верифицирован
08 апр 2020, 12:00
fc08ab6
Код
Авторство
О чём код?
export default (o, c, d) => { const proto = c.prototype proto.isToday = function () { const comparisonTemplate = 'YYYY-MM-DD' const now = d() return this.format(comparisonTemplate) === now.format(comparisonTemplate) } }