A modern date difference calculator with a clean UI. Calculate time spans between dates in years/months/weeks/days/hours.
- 📅 Date & time pickers with "Today" shortcuts
- 🕒 Multiple time unit displays (years → hours)
- ✅ Input validation & error handling
- 🧪 Full test coverage with Jest
- 🛠️ CI/CD pipeline ready
- Core: TypeScript
- Build: Vite
- Testing: Jest
- Linting: ESLint + Prettier
- CI/CD: GitHub Actions
- Node.js v18+
- npm v9+
git clone https://github.com/MatheusCampagnolo/Time-between-dates.git
cd Time-between-dates
npm install
Command | Description |
---|---|
npm run dev |
Start dev server (http://localhost:5173) |
npm run build |
Create production build in /dist |
npm run preview |
Serve production build (http://localhost:4173) |
npm test |
Run all Jest unit tests |
npm run lint |
Lint source files with ESLint |
npm run clean |
Remove dist directory |
npm run format |
Format codebase with Prettier |
Time-between-dates/
├── src/
│ ├── assets/ # Styles & static files
│ ├── interfaces/ # TypeScript types
│ ├── utils/ # Core date logic
│ ├── tests/ # Unit tests
│ └── index.ts # Main application logic
├── config/ # Tool configurations
│ ├── vite.config.ts
│ ├── jest.config.ts
│ └── eslint.config.mjs
│ └── tsconfig.json
│ └── .prettierrc
├── index.html # Main interface
├── package.json
└── README.md
MIT License - See LICENSE for details.