-
public class DateTimeFormatThis class represents the Java part of the Android Intl.DateTimeFormat implementation. The interaction with the Hermes JavaScript internals are implemented in C++ and should not generally need to be changed. Implementers' notes here will describe what parts of the ECMA 402 spec remain to be implemented.
Implementer notes:
Internal slots: In the ECMA 402 spec, there are a number of references to internal slots. These are generally expressed in terms of JavaScript objects, but the semantics do not generally depend on this. For example, where the spec says "Intl.DateTimeFormat instances have an [[InitializedDateTimeFormat]] internal slot", this would not be a literal artifact of the implementation. Internal slots, where necessary, should be represented as members of this java DateTimeFormat object.
ICU4J vs Unicode: The ECMA 402 spec makes reference to Unicode documents and data, such as Unicode Technical Standard 35 and the Common Locale Data Repository. However, in practice, platform Unicode implementations are based on the ICU libraries, which encapsulate the concepts in the Unicode documents and data, and do not provide direct access. The Android Intl platform code is expected to be implemented in terms of the Android ICU libraries such as android.icu.text and android.icu.number
-
-
Method Summary
Modifier and Type Method Description StringnormalizeTimeZoneName(String timeZoneName)StringnormalizeTimeZone(String timeZone)static List<String>supportedLocalesOf(List<String> locales, Map<String, Object> options)Map<String, Object>resolvedOptions()Stringformat(double jsTimeValue)List<Map<String, String>>formatToParts(double jsTimeValue)-
-
Method Detail
-
normalizeTimeZoneName
String normalizeTimeZoneName(String timeZoneName)
-
normalizeTimeZone
String normalizeTimeZone(String timeZone)
-
supportedLocalesOf
static List<String> supportedLocalesOf(List<String> locales, Map<String, Object> options)
-
resolvedOptions
Map<String, Object> resolvedOptions()
-
formatToParts
List<Map<String, String>> formatToParts(double jsTimeValue)
-
-
-
-