Skip to content
pubscout

isoweek

1.1.4, released 4 years ago by jensbecker.dev

Lightweight Dart package providing the Week class based on the ISO 8601 format.

WASM-ready
$ flutter pub add isoweek
Source repository

What it does

Provides a Week class to handle ISO 8601 week-numbering years in Dart. Allows you to easily find the current week, navigate to previous or future weeks, retrieve dates within a week, and parse ISO week strings.

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

Use it when

  • You need to work with ISO 8601 week numbers and date ranges in your Dart app.
  • You want to calculate previous or future weeks relative to a given date.

Skip it when

  • you need a full-featured date/time library with timezone handling and general datetime manipulation.

Strengths

  • Simple and lightweight API specifically for ISO 8601 weeks.
  • Supports conversions from DateTime and ISO strings.

Weaknesses

  • Very narrow scope, limited to week-based operations.
  • Does not handle general date formatting or timezones beyond local time.

Setup

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

void main() {
  Week currentWeek = Week.current();
  print('Current week: $currentWeek');

  Week futureWeek = currentWeek.addWeeks(5);
  print('5 weeks ahead: $futureWeek');
}

Alternatives

Packages that do the same job and could replace isoweek.

Works with

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