calendar_constants

An attempted improvement on how to expose weekday and month constants in Dart



Documentation

dart-calendar-constants

Dart currently exposes weekday and month constants as 3-letter abbreviated static constants in DateTime. This is bad because:

  • you always have to prefix them with "DateTime."
  • abbreviations are unreadable (especially for non-native english speakers?)
  • not really specific to DateTime, so misplaced
  • weekday and month constants are mixed together

This pub package is a proposal to:

You can compare the old way and new way.

If you agree, then star this issue.

Presumably these libraries would move to a more broad ranging calendar package in the future.