Skip to content

A TypeScript project to calculate the difference between two dates in various formats (days, weeks, months, years)

License

Notifications You must be signed in to change notification settings

MatheusCampagnolo/Time-between-dates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Time Between Dates

A modern date difference calculator with a clean UI. Calculate time spans between dates in years/months/weeks/days/hours.


🚀 Features

  • 📅 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

⚙️ Tech Stack

  • Core: TypeScript
  • Build: Vite
  • Testing: Jest
  • Linting: ESLint + Prettier
  • CI/CD: GitHub Actions

🛠️ Development Setup

Prerequisites

  • Node.js v18+
  • npm v9+

Installation

git clone https://github.com/MatheusCampagnolo/Time-between-dates.git
cd Time-between-dates
npm install

📜 Available Commands

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

🏗️ Project Structure

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

📄 License

MIT License - See LICENSE for details.

About

A TypeScript project to calculate the difference between two dates in various formats (days, weeks, months, years)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published