A modern, user-friendly web application for calculating travel duration between any two locations. Perfect for planning trips, flights, or any journey where you need to know exactly how long you'll be in transit, accounting for timezone differences and Daylight Saving Time (DST) automatically.
- Accurate Duration Calculation: Automatically handles timezone differences and Daylight Saving Time (DST) transitions using Luxon
- City & Timezone Search: Search for cities or select timezones directly with an intuitive autocomplete interface
- Saved Timezones: Save up to 5 frequently used timezones for quick access (stored in browser localStorage)
- Smart Defaults: Automatically pre-fills departure and arrival times with your current timezone
- Modern UI: Responsive, high-performance interface built with Tailwind CSS 4 and OKLCH color space
- Type-Safe: Fully written in TypeScript for reliability and developer experience
- Fast Development: Powered by Next.js 16 App Router and Turbopack for lightning-fast hot reload
- Framework: Next.js 16 (App Router)
- UI Library: React 19
- Styling: Tailwind CSS 4 with OKLCH colors
- Date/Time: Luxon for timezone and DST handling
- City Data: city-timezones for location-based timezone lookup
- Testing: Jest with React Testing Library
- Language: TypeScript
- Node.js 18+
- Yarn (recommended) or npm
Clone the repository and install dependencies:
yarn install
# or
npm installStart the development server:
yarn dev
# or
npm run devOpen http://localhost:3000 in your browser to see the application.
yarn build
# or
npm run buildyarn start
# or
npm startyarn lint
# or
npm run lintRun the test suite:
yarn test
# or
npm testThe project includes comprehensive tests for:
- Duration calculation logic
- React components
- Custom hooks
- Form validation
- Enter Departure Details: Select the date, time, and timezone/city for your departure
- Enter Arrival Details: Select the date, time, and timezone/city for your arrival
- Calculate: Click the button to instantly see the exact duration of your trip
- Save Timezones: Frequently used timezones can be saved for quick access (up to 5)
The calculator automatically handles:
- Timezone conversions
- Daylight Saving Time transitions
- Date boundaries (trips spanning multiple days)
- Invalid date/time combinations
This project is licensed under the MIT License.