Skip to content
pubscout

in_date_utils

1.3.0, released a year ago by innim.ru

Utility functions for modifying, checking, comparing, and generating DateTime instances.

WASM-ready
$ flutter pub add in_date_utils
Source repository

What it does

Provides helper methods for DateTime objects to easily manipulate dates, check days of the week or month, calculate differences, and generate date ranges. It also includes support for different week numbering strategies.

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

Use it when

  • You need to perform date manipulations like finding start/end of days and weeks
  • You need to calculate differences between dates in days or months
  • You require custom week numbering strategies like ISO 8601

Skip it when

  • You need heavy internationalized date formatting and parsing (use intl instead)
  • You only require basic Dart DateTime operations without extra helpers

Strengths

  • Comprehensive collection of date manipulation and checking methods
  • Handles daylight saving time changeovers for date generation and boundaries
  • Supports customizable week numbering options via WeekNumbering enum

Weaknesses

  • Limited to date utilities and lacks full timezone database features
  • Does not provide UI date picker widgets

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
import 'package:in_date_utils/in_date_utils.dart';

void main() {
  final now = DTU.now();
  print(DTU.startOfDay(now));
  print(DTU.getDaysInYear(2020));
}

Alternatives

Packages that do the same job and could replace in_date_utils.

  • package_signature

    Retrieve Android package signature (SHA1/SHA256) in a Flutter app.

  • day

    A Dart date library inspired by Day.js with a chainable and immutable API.

  • week_number

    Extension methods to get the week number and ordinal date from a DateTime object.

  • dart_date

    Date manipulation library providing DateTime extensions and an Interval object.

Works with

Packages commonly used together with in_date_utils: ones it builds on, ones built on it, and its own family.