-
Notifications
You must be signed in to change notification settings - Fork 24
[Future] Add type
option for numeric vs. text formatting
#9
Comments
instead of |
Do we actually want the numeric style? When do you want to see "1 day ago", as opposed to always using text when it's available? |
@caridy It's hard for me to see how we could use |
It seems reasonable that we drop this feature for the v1, and maybe bringing it back if needed. We need a label for this. |
type
option for numeric vs. text formattingtype
option for numeric vs. text formatting
I can see it being valuable for some technical UI for consistency between "1 month ago" and "2 months ago" etc. |
the numeric form may fit better when it's along side other numbers, such as "The server caught fire: 3 days ago, 2 days ago, 1 day ago". where the text form may be better as a standalone singleton: "The server last caught fire: yesterday" |
I'm no longer sure if we can drop it from v1. We implemented the v0 spec in SpiderMonkey and are now trying to use it in Firefox UI with some Basically, the Thus, I'm leaning toward either recommending we do |
@zbraniecki I don't quite understand; do you have a bug thread somewhere that provides more context? |
Yeah! It's basically rxaviers epoch vs date bestFit dillema - https://bugzilla.mozilla.org/show_bug.cgi?id=1407240 |
@zbraniecki Yeap, the ability to "disable the textual forms" (e.g., to disable "Yesterday" and get "1 day ago") could be useful given your use case and @srl295's comment above. The "hardest part" to me here seems the options names:
Among the two, I still prefer the numeric vs. text. I'm wondering if we had additional choices... |
@rxaviers we merged the numeric vs text. If you come up with better naming, file a new issue pls! :) |
Sounds good. Thanks |
ICU provides two functions for formatting relative date:
text
andnumeric
- the difference is that intext
mode it attempts to use human readable terms likeyesterday
andlast week
instead of numeric1 day ago
and1 week ago
.I'd like to suggest adding this in form of
type
option:I'd suggest the
text
value to be the default.The text was updated successfully, but these errors were encountered: