smart_date_formatter 2.0.0
smart_date_formatter: ^2.0.0 copied to clipboard
A smart Flutter date formatting utility that converts DateTime into human-readable strings like '2 hours ago', 'Yesterday', 'Next Monday', and more.
2.0.0 #
- 🎉 Major release — Full Calendar Widget!
- Added
SmartCalendarwidget- Month view — full grid calendar
- Week view — week strip with events list
- Day view — single day detail view
- View switcher — switch between month/week/day
- Today button — jump to today
- Smooth navigation with chevron buttons
- Added
SmartCalendarControllernextMonth/previousMonthnextWeek/previousWeeknextDay/previousDayjumpToDate/jumpToMonthgoToToday/selectDateisCurrentMonth
- Added
CalendarEventmodel- title, date, color, description
- allDay, startTime, endTime
isOnDate(),timeString
- Added
EventMarkerStyle— dot, chip, both - Added
CalendarView— month, week, day
1.6.0 #
- SmartParser — major improvements
- New English expressions:
midnight,noon,end of daystart/end of month,start/end of yearstart/end of weekthis weekend,next weekend,last weekendday after tomorrow,day before yesterdaya day ago,in a weekN days/weeks from now
- Added Hindi parsing support:
आज,कल,परसोंअगले/पिछले हफ्ते/महीने/सालअगले/पिछले सोमवार...रविवार{n} दिन बाद/पहले
- Added Marathi parsing support:
आज,उद्या,काल,परवापुढील/मागील आठवडा/महिना/वर्षपुढील/मागील सोमवार...रविवार{n} दिवसांनी/{n} दिवसांपूर्वी
- Added
SmartParser.parseLocale()— parse with explicit locale - Added
SmartParser.canParseLocale()— check locale parsing - Added
SmartParser.supportedParseLocales— ['en', 'hi', 'mr']
1.5.0 #
- Added
StreakCalculator— habit/attendance streak analysiscurrentStreak()— active streak countlongestStreak()— best streak everisTodayCompleted()— today checktotalCompleted()— total days countcompletionRate()— percentage between datesallStreaks()— all streak runs as listmissedDays()— missed days since startlastCompletedDate()— most recent date
- Added
DateGrouper— group dates by time periodbyDay/byWeek/byMonth/byQuarter/byYearbyHour/byWeekdaycountByDay/countByMonth/countByWeekdaymostActiveDay/mostActiveWeekday/mostActiveHouraverageGap()
1.4.0 #
- Added
HolidayHelper— holiday detection and working day utilities - Added
isHoliday(),isWorkingDay()static methods - Added
addWorkingDays()with holiday skip support - Added
workingDaysBetween()with holiday skip support - Added
nextWorkingDay(),previousWorkingDay() - Added
indianHolidays(),globalHolidays()preset lists - Added
HolidayExtensionon DateTime - Added
RecurrenceHelper— generate recurring date lists - Added
RecurrenceFrequencyenum: daily, weekly, monthly, yearly - Recurrence supports: count, until date, skipWeekends, skipHolidays
- Added
RecurrenceHelper.daily/weekly/monthly/yearlyconvenience methods - Added
RecurrenceHelper.nextOccurrence()
1.3.0 #
- Added
DateBadgewidget — smart date chip/badge- Styles: chip, outlined, flat
- Auto colors: green (today), blue (tomorrow), orange (yesterday)
- Custom label support
- Added
SmartDateTextwidget — all-in-one date text widget- Modes: timeAgo, calendar, shortTimestamp, custom, auto
- Auto-refresh support
- prefix/suffix support
- Added
RelativeDateBuilderwidget — builder pattern for custom UI- Provides timeAgo, calendar, shortTimestamp strings
- Auto-refresh support
1.2.1 #
- Refactored example app — modular tab structure
- Added shared widgets: ExampleTile, SectionHeader, CodeBox
- Stricter analysis_options.yaml rules
- No API changes — pure code quality improvement
...
1.2.0 #
- Added 10 new languages — total 16 supported!
- International: German (de), Russian (ru), Chinese Simplified (zh)
- Indian: Marathi (mr), Gujarati (gu), Bengali (bn), Tamil (ta), Telugu (te), Kannada (kn), Punjabi (pa)
- Updated
SdfLocale.supported— now 16 locales - Updated
SdfLocale.fromCode()— supports all 16 codes
...
1.1.0 #
- Added
quarter— quarter of year (1–4) - Added
isQ1,isQ2,isQ3,isQ4 - Added
weekOfYear— week number (1–53) - Added
dayOfYear— day number (1–366) - Added
isLeapYear - Added
isMorning,isAfternoon,isEvening,isNight - Added
isSameDay,isSameWeek,isSameMonth,isSameYear - Added
nextMondaythroughnextSunday - Added
previousMondaythroughpreviousSunday - Added
copyWith— create modified copies of DateTime
...
1.0.1 #
- Added live playground link in README
- Minor documentation improvements
1.0.0 #
- 🎉 Stable release!
- Added
TimeAgoTextwidget — auto-refreshing relative time widget - Added
CountdownTextwidget — live countdown to a target DateTime - Added
DateRangeHelper— ready-made date ranges for DB queries - Added
DateRangeclass withcontains(),overlaps(),days - Ranges: today, yesterday, tomorrow, thisWeek, lastWeek, nextWeek, thisMonth, lastMonth, nextMonth, thisYear, lastYear, lastNDays(n), nextNDays(n), custom(s,e), quarter(q), currentQuarter
- Stable API — no breaking changes planned
0.9.0 #
- Added
SdfLocale— built-in localization support - Supported locales: English, Hindi, Spanish, French, Japanese, Arabic
- Added
SmartDateFormatter(locale: SdfLocale.hi)constructor - Added
timeAgoIn(SdfLocale)DateTime extension - Added
SdfLocale.fromCode(String)— locale by code string - Added
SmartParser— natural language to DateTime - SmartParser supports: today, tomorrow, yesterday, next/last week/month/year, in N days/weeks/months, N days/weeks ago, next/last weekday
0.5.0 #
- Added
addWorkingDays(n)— adds working days skipping weekends - Added
daysUntil(date)— days between two dates - Added
daysSince(date)— days since a date - Added
isBetween(start, end)— range check - Added
isWeekend— Saturday or Sunday check - Added
isWeekday— Monday to Friday check - Added
age— age in years from birthdate - Added
startOfWeek/endOfWeek - Added
startOfMonth/endOfMonth - Added
startOfYear/endOfYear - Added
workingDaysUntil(date)— working days count - Added
DateCalculationsclass
0.1.0 #
- Added
format(String pattern)extension — custom pattern-based formatting - Added
toReadable— "Saturday, 15 June 2024" - Added
toISO— "2024-06-15T14:30:00" - Added
toTimeString— "14:30:00" - Added
to12Hour— "02:30 PM" - Added
to24Hour— "14:30" - Added
DateFormatHelperclass — zero dependency formatter - Supported tokens: dd, d, MM, MMM, MMMM, yyyy, yy, HH, hh, mm, ss, a, EEEE, EEE
0.0.4 #
- Added missing CHANGELOG.md to comply with pub.dev requirements
- Improved package documentation and structure
- Minor internal improvements and cleanup
0.0.3 #
-
Initial stable release of smart_date_formatter
-
Converts DateTime into human-readable formats like:
- "Just now"
- "2 hours ago"
- "Yesterday"
- "Next Monday"
-
Improved formatting logic and edge case handling
0.0.2 #
- Minor improvements and bug fixes
0.0.1 #
- Initial project setup