UNPKG

@arche-mc2/arche-controls

Version:

We know that there are a ton of react UI library projects to choose from. Our hope with this one is to provide the next generation of react components that you can use to bootstrap your next project, or as a reference for building a UIKit. Read on to get

20 lines 677 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var moment = require("moment"); var isBeforeDay = function (aDay, bDay) { if (!moment.isMoment(aDay) || !moment.isMoment(bDay)) return false; var aYear = aDay.year(); var aMonth = aDay.month(); var bYear = bDay.year(); var bMonth = bDay.month(); var isSameYear = aYear === bYear; var isSameMonth = aMonth === bMonth; if (isSameYear && isSameMonth) return aDay.date() < bDay.date(); if (isSameYear) return aMonth < bMonth; return aYear < bYear; }; exports.default = isBeforeDay; //# sourceMappingURL=isBeforeDay.js.map