Skip to content
pubscout

simple_date

1.1.2, released 7 months ago by jfk.dev

A simple date model for Dart with no notion of time.

WASM-ready
$ flutter pub add simple_date
Source repository

What it does

Provides a date-only model as a simpler alternative to Dart's built-in DateTime class. It handles date arithmetic, comparison methods, and date ranges without worrying about time zones or hours.

AI-written summary of version 1.1.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to handle date-only events like birthdays or anniversaries
  • You want to avoid time zone complications associated with DateTime

Skip it when

  • You need to track hours, minutes, seconds, or time zones
  • You require complex calendar systems beyond standard Gregorian dates

Strengths

  • Simplifies date-only logic without time overhead
  • Lightweight with minimal dependencies

Weaknesses

  • Limited to date-only operations
  • Lacks time zone and time-of-day support

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
final today = SimpleDate.today();
final moonLanding = SimpleDate(1969, 07, 20);

print(today.isAfter(moonLanding)); // true

Alternatives

Packages that do the same job and could replace simple_date.

  • snowplow_tracker

    Flutter package for sending Snowplow analytics events on Android, iOS, and Web.

  • date_time

    Provides Date, Time, and range classes with comparison and manipulation utilities.

  • swiss_knife

    Collection of Dart utility tools for collections, math, date, URI, JSON, events, and resources.

  • jiffy

    Parse, manipulate, query, and format dates and times in Dart and Flutter.