Re: Intent to deprecate and then unship: nsIScriptableDateFormat

2016-10-30 Thread Philipp Kewisch
On 10/28/16 12:40 PM, Jonathan Kew wrote:
> We're proposing to remove the XPCOM service nsIScriptableDateFormat,
> used for locale-appropriate formatting of date/time values.[1]

Thanks for the heads up. Do you have a proposed timeline for the removal?

Bugs are filed for mailnews (bug 1313659) and calendar (bug 1229684) for
the comm-central part.

Philipp

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Intent to deprecate and then unship: nsIScriptableDateFormat

2016-10-28 Thread Jonathan Kew
We're proposing to remove the XPCOM service nsIScriptableDateFormat, 
used for locale-appropriate formatting of date/time values.[1]


Front-end code that needs this functionality should move to the standard 
JS i18n APIs.[2,3]  I've got a bunch of patches just about ready to land 
in [4] that make this switch for most of our existing call-sites in 
mozilla-central.


Once we have switched all m-c users of nsIScriptableDateFormat over to 
Intl.DateTimeFormat and related standard APIs, we'd like to remove the 
nsIScriptableDateFormat interface itself (and ultimately the 
platform-specific implementations of nsIDateTimeFormat that back it). 
We don't want to maintain that code any longer, given that we now have a 
standards-based version of essentially equivalent functionality.


We may not be able to completely eliminate the old code until the 
ECMA402 Intl API is enabled on Android.[5]  But this message is intended 
as a heads-up that its doom is approaching


This will, of course, also affect code outside of mozilla-central -- 
e.g. comm-central, add-ons -- that uses nsIScriptableDateFormat.  Such 
code should also migrate to the standard JS APIs for date/time formatting.


I've filed [6] about deprecating the interface; once we have publicly 
done that, I expect the next step will be complete removal.


JK

[1] 
https://dxr.mozilla.org/mozilla-central/source/intl/locale/nsIScriptableDateFormat.idl

[2] https://tc39.github.io/ecma402/#datetimeformat-objects
[3] 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat

[4] https://bugzilla.mozilla.org/show_bug.cgi?id=1301655
[5] https://bugzilla.mozilla.org/show_bug.cgi?id=1215252
[6] https://bugzilla.mozilla.org/show_bug.cgi?id=1313625

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform