dart-lang / i18n

A general mono-repo for Dart i18n and l10n packages.
BSD 3-Clause "New" or "Revised" License
64 stars 39 forks source link

Implement DateFormat.formatDuration and parseDuration #315

Open DartBot opened 9 years ago

DartBot commented 9 years ago

Issue by danrubel Originally opened as dart-lang/sdk#19802


Add a way to localize times in a relative way to the itl package, like:

Yesterday, Two minutes ago, Just now, tomorrow... //////////////////////////////////////////////////////////////////////////////////// Editor: 1.5.0.dev_04_23 (2014-06-24) OS: Windows 8 - amd64 (6.2) JVM: 1.7.0_51

projects: 6

open dart files: 0

auto-run pub: true localhost resolves to: 127.0.0.1 mem max/total/free: 1778 / 1236 / 365 MB thread count: 31 index: 1152663 relationships in 191806 keys in 1716 sources

SDK installed: true Dartium installed: true

DartBot commented 9 years ago

Comment by dgrove


Set owner to @alan-knight. Added Area-Pkg, Pkg-Intl, Triaged labels.

DartBot commented 9 years ago

Comment by alan-knight


There is a way, it just isn't actually implemented yet. See also 10139


Changed the title to: "Implement DateFormat.formatDuration and parseDuration".

furkantektas commented 5 years ago

It's been 4 years and unfortunately, there is no update on this issue. Should we wait longer? Or, should we expect these functions not to be implemented at all? 🙂

alan-knight commented 5 years ago

A lot more of these functions are available now in JS Intl, so the idea for future improvements is to be able to delegate them to the JS versions, or to existing libraries on mobile. There is work happening on this, so durations might actually happen in the not too distant future.

furkantektas commented 5 years ago

Thanks :) So, I continue using the alternative on mobile for now.

lukepighetti commented 5 years ago

Possible way forward? https://github.com/desktop-dart/duration/issues/7

fwiw, I find intl to be incredibly useful in Flutter. It never occurred to me to use native libraries. Was there a specific library you're suggesting as an alternative to intl on mobile?

shadyshrif commented 4 years ago

Any news about this function?

Reprevise commented 3 years ago

Any updates?

praxder commented 2 years ago

bump