date-time-day-utils
v1.0.2
Published
simple tool to get day , date and current time
Readme
📦 date-time-utils
A lightweight TypeScript utility package for retrieving the current date, time, and day of the week.
Useful for projects that need consistent and minimal date/time information without pulling in heavy libraries.
📥 Installation
npm install date-time-utilsUsage
Import functions
import { getDate, getTime, getDay } from 'date-time-utils';
console.log(getDate());
console.log(getTime());
console.log(getDay()); 📚 API Reference
getDate(): number
Returns the day of the month (1–31).
getTime(): number
Returns the timestamp (milliseconds since Unix epoch).
getDay(): number
Returns the day of the week (0 = Sunday, 6 = Saturday).
🛠 Development
Build the TypeScript source:
npm run buildProject structure:
date-time-utils/
├── src/
│ └── index.ts # Source code
├── dist/ # Compiled output
├── package.json
├── tsconfig.json
└── README.mdThen in your test project:
npm link date-time-utils📝 License
MIT © Utkarsh Saxena
