react-day-picker
Version:
Flexible date picker component for React
50 lines (40 loc) • 1.27 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.formatDay = formatDay;
exports.formatMonthTitle = formatMonthTitle;
exports.formatWeekdayShort = formatWeekdayShort;
exports.formatWeekdayLong = formatWeekdayLong;
exports.getFirstDayOfWeek = getFirstDayOfWeek;
exports.getMonths = getMonths;
var WEEKDAYS_LONG = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
var WEEKDAYS_SHORT = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
var MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
function formatDay(day) {
return day.toDateString();
}
function formatMonthTitle(d) {
return MONTHS[d.getMonth()] + ' ' + d.getFullYear();
}
function formatWeekdayShort(i) {
return WEEKDAYS_SHORT[i];
}
function formatWeekdayLong(i) {
return WEEKDAYS_LONG[i];
}
function getFirstDayOfWeek() {
return 0;
}
function getMonths() {
return MONTHS;
}
exports.default = {
formatDay: formatDay,
formatMonthTitle: formatMonthTitle,
formatWeekdayShort: formatWeekdayShort,
formatWeekdayLong: formatWeekdayLong,
getFirstDayOfWeek: getFirstDayOfWeek,
getMonths: getMonths
};
//# sourceMappingURL=LocaleUtils.js.map
;