jiffy
6.4.5, released 6 months ago by an unverified publisher
Parse, manipulate, query, and format dates and times in Dart and Flutter.
What it does
Jiffy is a date time package for Flutter and Dart that simplifies parsing strings, lists, or maps into dates, manipulating them through additions or subtractions, querying relationships like 'isBefore' or 'isBetween', and formatting with custom patterns or relative time strings.
AI-written summary of version 6.4.5, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need complex date calculations and time manipulation in your app
- You require relative time formatting like '5 years ago' or 'in 25 years
- You want easy localized date formatting across multiple languages
Skip it when
- You only need basic DateTime operations provided natively by Dart
- You want a reactive or stream-based clock library
Strengths
- Extensive formatting options and pre-set formats
- Robust relative time calculations (from/to now)
- Built-in localization support for multiple locales
Weaknesses
- Adds an external dependency for features overlapping with the standard library
- Requires asynchronous loading/setting for non-default locales
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Simply add jiffy to your pubspec.yaml dependencies and import it.
import 'package:jiffy/jiffy.dart';
void main() {
var formattedDate = Jiffy.now().format(pattern: 'MMMM do yyyy, h:mm:ss a');
print(formattedDate);
}Alternatives
Packages that do the same job and could replace jiffy.
- html
A Dart implementation of an HTML5 parser for strings and bytes.
91Compare - xml
Full-featured XML and XPath library for DOM parsing, SAX streaming, and fluent building.
92Compare - money2
High-precision library for storing, parsing, formatting, and performing arithmetic on money.
89Compare - time_machine2
Comprehensive date and time library with support for timezones, calendars, cultures, and parsing.
59Compare
Works with
Packages commonly used together with jiffy: ones it builds on, ones built on it, and its own family.
- intljiffy depends on itA Dart library for internationalization and localization, providing message translation, plural/gender handling, and date/number formatting.
- quiverjiffy depends on itA set of utility libraries for Dart containing collections, async tools, and testing helpers.
- stream_chat_flutterBuilt on jiffyFull-featured Flutter UI SDK for Stream Chat, providing ready‑made chat widgets and theming.
- syncfusion_flutter_xlsioBuilt on jiffyCreate, format, and manipulate Excel documents programmatically in Dart and Flutter.
- magicBuilt on jiffyFull‑stack Flutter framework offering Laravel‑style models, auth, routing, realtime and payments across all platforms.
- swifty_chatBuilt on jiffyFlutter package to build chat UIs with multiple message kinds like text, image, HTML, and carousels.
- cr_calendarBuilt on jiffyCustomizable Flutter calendar widget with range picking and event showing.