src/components/form/utils.tsimport { DateTime } from 'luxon'// ============================================================================// Form Utilities & Constants// ============================================================================// Default timezone (can be overridden by component props)export const DEFAULT_TIMEZONE = 'America/New_York'// Get current date/time in a specific timezoneexport function getNow(timezone: string = DEFAULT_TIMEZONE) {return DateTime.now().setZone(timezone)}// Get today's date (start of day) in a specific timezoneexport function getToday(timezone: string = DEFAULT_TIMEZONE) {return getNow(timezone).startOf('day')}// Check if a date is in the past (compared to timezone's today)
Showing the first 20 lines.
Get full code