UNPKG

atikin-timebuddy

Version:

Atikin TimeBuddy โ€“ Lightweight Date & Time Utilities for Everyday Use

74 lines (56 loc) โ€ข 2.29 kB
# Atikin TimeBuddy > ๐Ÿš€ Lightweight Date & Time Utilities for Everyday Use โ€“ built with โค๏ธ by Atikin Verse Atikin TimeBuddy is a blazing-fast, zero-dependency JavaScript utility toolkit for working with time and date. Whether you're formatting timestamps, calculating working days, or localizing timezones, TimeBuddy makes it easy. ## โœจ Features - โœ… Human-readable time: `"2 minutes ago"`, `"3 days ago"` - ๐Ÿ“… Simple date formatting: `"15 Jun 2025"` - ๐ŸŒ Timezone support with native JS - ๐Ÿ” Add/subtract days or hours - ๐Ÿ“† Calculate working days - ๐Ÿ—“๏ธ Get labels like "Today", "Tomorrow", etc. - ๐Ÿงช 100% Testable, Zero Dependencies ## ๐Ÿ“ฆ Installation ```bash npm i atikin-timebuddy ``` ## ๐Ÿ”ง Usage ```js const { timeAgo, formatDate, getTimeInZone, addDays, subtractHours, isWeekend, workingDaysBetween, getRelativeDay } = require('@atikinverse/timebuddy'); console.log(timeAgo('2025-06-14T19:30:00')); // "x hours ago" console.log(formatDate(new Date(), 'short')); // "15 Jun 2025" console.log(getTimeInZone('Asia/Kolkata')); // "2025-06-15 09:30 PM" console.log(addDays(new Date(), 5)); // Add 5 days to today console.log(isWeekend(new Date())); // true or false console.log(workingDaysBetween('2025-06-01', '2025-06-15')); // 11 console.log(getRelativeDay('2025-06-15')); // "Today" ``` ## ๐Ÿ”’ License MIT ยฉ Atikin Verse. ## FOLLOW US ON For more information: Join our social media for exciting updates, news, and insights! Follow us on : <!--Table--> | ACCOUNTS | USERNAME | |------------ | -------------- | | FACEBOOK | atikinverse | | INSTAGRAM | atikinverse | | LINKEDIN | atikinverse | | TWITTER (X) | atikinverse | | THREADS | atikinverse | | PINTREST | atikinverse | | QUORA | atikinverse | | REDDIT | atikinverse | | TUMBLR | atikinverse | | SNAPCHAT | atikinverse | | SKYPE | atikinverse | | GITHUB | atikinverse | Feel free to reach out if you have any questions or suggestions! Happy Coding! ๐Ÿš€