Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intl package: add CLDR-based duration / age formatting #11075

Closed
DartBot opened this issue Jun 4, 2013 · 3 comments
Closed

intl package: add CLDR-based duration / age formatting #11075

DartBot opened this issue Jun 4, 2013 · 3 comments
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams.

Comments

@DartBot
Copy link

DartBot commented Jun 4, 2013

This issue was originally filed by @seaneagan


The intl package currently has unimplemented methods on DateFormat for this called formatDuration and formatDurationFrom. This is the wrong location for these APIs. Arbitrary DateFormat patterns don't match up to the corresponding CLDR data model.

The intlx package (http://pub.dartlang.org/packages/intlx) has DurationFormat which formats Durations, e.g. "5 minutes" or "5 min" and AgeFormat which formats DateTimes offset from now, e.g. "In 5 minutes" or "5 minutes ago" using CLDR data. See the following:

Demo: http://seaneagan.me/intlx/
Docs:
  http://seaneagan.me/intlx/docs/intlx/DurationFormat.html
  http://seaneagan.me/intlx/docs/intlx/AgeFormat.html

Proposal: move DurationFormat and AgeFormat to intl package and remove DateFormat.formatDuration/formatDurationFrom.

@iposva-google
Copy link
Contributor

Added Area-Pkg, Triaged labels.

@sethladd
Copy link
Contributor

Added Pkg-Intl label.

@DartBot DartBot added Type-Defect area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. labels Jul 16, 2014
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/i18n#332.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams.
Projects
None yet
Development

No branches or pull requests

4 participants