agenda/node_modules/@fullcalendar/list/index.cjs
Edward Betts ea4980a5d7 Fix European trip return heuristic for weekend location tracking
Adjust European short trip heuristic from >3 days to >1 day to correctly
detect when user has returned home from European trips. This fixes the
April 29-30, 2023 case where the location incorrectly showed "Sankt Georg, Hamburg"
instead of "Bristol" when the user was free (no events scheduled) after
the foss-north trip ended on April 27.

The previous logic required more than 3 days to pass before assuming
return home from European countries, but for short European trips by
rail/ferry, users typically return within 1-2 days.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 06:38:37 +02:00

57 lines
1.9 KiB
JavaScript

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var index_cjs = require('@fullcalendar/core/index.cjs');
var internalCommon = require('./internal.cjs');
var internal_cjs = require('@fullcalendar/core/internal.cjs');
require('@fullcalendar/core/preact.cjs');
const OPTION_REFINERS = {
listDayFormat: createFalsableFormatter,
listDaySideFormat: createFalsableFormatter,
noEventsClassNames: internal_cjs.identity,
noEventsContent: internal_cjs.identity,
noEventsDidMount: internal_cjs.identity,
noEventsWillUnmount: internal_cjs.identity,
// noEventsText is defined in base options
};
function createFalsableFormatter(input) {
return input === false ? null : internal_cjs.createFormatter(input);
}
var index = index_cjs.createPlugin({
name: '@fullcalendar/list',
optionRefiners: OPTION_REFINERS,
views: {
list: {
component: internalCommon.ListView,
buttonTextKey: 'list',
listDayFormat: { month: 'long', day: 'numeric', year: 'numeric' }, // like "January 1, 2016"
},
listDay: {
type: 'list',
duration: { days: 1 },
listDayFormat: { weekday: 'long' }, // day-of-week is all we need. full date is probably in headerToolbar
},
listWeek: {
type: 'list',
duration: { weeks: 1 },
listDayFormat: { weekday: 'long' },
listDaySideFormat: { month: 'long', day: 'numeric', year: 'numeric' },
},
listMonth: {
type: 'list',
duration: { month: 1 },
listDaySideFormat: { weekday: 'long' }, // day-of-week is nice-to-have
},
listYear: {
type: 'list',
duration: { year: 1 },
listDaySideFormat: { weekday: 'long' }, // day-of-week is nice-to-have
},
},
});
exports["default"] = index;