GitShow/vercel/little-date
vercel

little-date

A friendly formatter to make date ranges small & sweet

by vercel
Star on GitHubForknpm

TypeScript

2.0k stars21 forks4 contributorsQuiet · 8mo agoSince 2023v1.2.1MIT

Meet the team

See all 4 on GitHub →
timolins
timolins57 contributions
hood
hood1 contribution
eltociear
eltociear1 contribution
feugy
feugy1 contribution

Languages

View on GitHub →
TypeScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
50
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · 3 in progress · Last activity 8mo ago
See all on GitHub →
fxamauri
feat: passing locale format date-fnsOpenPR

Hello guys, I made the changes to allow passing the locale in the format calls, and I think this might resolve #6 . I hope this helps! I'm available for any further adjustments if needed.

fxamauri · 1y ago
Keith-Web3
Dedicated page for date pickerOpenIssue

I couldn't find any linked page to the repo. It would be nice if there was a dedicated page that shows examples of the different date pickers.

Keith-Web3 · 1y ago
a95z
Issue with Minute Precision in FormatDateRange for Entire Period (Months, Quarters, Years) RangesOpenIssue

The function currently uses minute precision to determine if a date range spans a full year. However, an issue arises when the end date is set to the start of the day (00:00:00) or other minutes, rather than 59 on the final date of the range. To accurately identify a full-year range, the function requires the end time to be 23:59:59. To improve accuracy, it's necessary to ignore the minute precision check for year-long ranges. Example When formatting a range from: Start Date: Mon Jan 01 2024 00:00:00 End Date: Tue Dec 31 2024 00:00:00 The function incorrectly formats this as a month range "Jan 1 - Dec 31" instead of "2024". This is because the function expects the end time to be exactly 23:59:59. Suggested Fix Update the code to skip minute-level checks for year and month ranges. Use broader checks like instead. Current Code: Updated Code: In addition to the year-long ranges, similar adjustments are needed for other periods such as months and quarters. The same approach can be applied to handle these periods more accurately.

a95z · 1y ago

Recent fixes

View closed PRs →
franciscop
Just a suggestion to link to the examples/testsMergedPR

Just a small suggestion, feel free to close/cancel! Unfortunately there was no way to keep the table format as it was with these huge links. PS, would be happy to link to the rest of places, I was just a bit confused about the "special cases" and thus only linked those.

franciscop · 2mo ago
lauridskern
Date not little enoughClosedIssue

!image

lauridskern · 1y ago
madatbay
[BUG] locale only applies to time formatClosedIssue

Issue description Passing locale to the formatDateRange function only localizes time part of the range, date part remains in english. As a note. I'm also using with its localization, works good. Version: Recreate the bug: Insights After checking source code of the , i've found out that locale that passed into is only used for time formatting () and default function is used from . Locale needs to be passed to function too. At least, that's how I solved by modifying code locally.

madatbay · 1y ago
Structured data for AI agents

Repository: vercel/little-date. Description: A friendly formatter to make date ranges small & sweet Stars: 1963, Forks: 21. Primary language: TypeScript. Languages: TypeScript (100%). License: MIT. Latest release: v1.2.1 (8mo ago). Open PRs: 3, open issues: 4. Last activity: 8mo ago. Community health: 50%. Top contributors: timolins, hood, eltociear, feugy.

·@ofershap

Replace github.com with gitshow.dev