mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 15:42:14 +00:00
ICU-22583 BRS 75rc CLDR 45-alpha0 to ICU main part 3 (source and test code changes)
This commit is contained in:
parent
c7245a36df
commit
12cbf73e39
16 changed files with 121 additions and 47 deletions
|
@ -80,6 +80,7 @@ class ConversionRateDataSink : public ResourceSink {
|
|||
UnicodeString baseUnit = ICU_Utility::makeBogusString();
|
||||
UnicodeString factor = ICU_Utility::makeBogusString();
|
||||
UnicodeString offset = ICU_Utility::makeBogusString();
|
||||
UnicodeString special = ICU_Utility::makeBogusString();
|
||||
UnicodeString systems = ICU_Utility::makeBogusString();
|
||||
for (int32_t i = 0; unitTable.getKeyAndValue(i, key, value); i++) {
|
||||
if (uprv_strcmp(key, "target") == 0) {
|
||||
|
@ -88,12 +89,14 @@ class ConversionRateDataSink : public ResourceSink {
|
|||
factor = value.getUnicodeString(status);
|
||||
} else if (uprv_strcmp(key, "offset") == 0) {
|
||||
offset = value.getUnicodeString(status);
|
||||
} else if (uprv_strcmp(key, "special") == 0) {
|
||||
special = value.getUnicodeString(status);
|
||||
} else if (uprv_strcmp(key, "systems") == 0) {
|
||||
systems = value.getUnicodeString(status);
|
||||
}
|
||||
}
|
||||
if (U_FAILURE(status)) { return; }
|
||||
if (baseUnit.isBogus() || factor.isBogus()) {
|
||||
if (baseUnit.isBogus() || (factor.isBogus() && special.isBogus())) {
|
||||
// We could not find a usable conversion rate: bad resource.
|
||||
status = U_MISSING_RESOURCE_ERROR;
|
||||
return;
|
||||
|
@ -107,10 +110,13 @@ class ConversionRateDataSink : public ResourceSink {
|
|||
} else {
|
||||
cr->sourceUnit.append(srcUnit, status);
|
||||
cr->baseUnit.appendInvariantChars(baseUnit, status);
|
||||
cr->factor.appendInvariantChars(factor, status);
|
||||
cr->systems.appendInvariantChars(systems, status);
|
||||
trimSpaces(cr->factor, status);
|
||||
if (!factor.isBogus()) {
|
||||
cr->factor.appendInvariantChars(factor, status);
|
||||
trimSpaces(cr->factor, status);
|
||||
}
|
||||
if (!offset.isBogus()) cr->offset.appendInvariantChars(offset, status);
|
||||
if (!special.isBogus()) cr->offset.appendInvariantChars(special, status);
|
||||
cr->systems.appendInvariantChars(systems, status);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -31,7 +31,7 @@ class U_I18N_API ConversionRateInfo : public UMemory {
|
|||
ConversionRateInfo() {}
|
||||
ConversionRateInfo(StringPiece sourceUnit, StringPiece baseUnit, StringPiece factor,
|
||||
StringPiece offset, UErrorCode &status)
|
||||
: sourceUnit(), baseUnit(), factor(), offset() {
|
||||
: sourceUnit(), baseUnit(), factor(), offset(), special() {
|
||||
this->sourceUnit.append(sourceUnit, status);
|
||||
this->baseUnit.append(baseUnit, status);
|
||||
this->factor.append(factor, status);
|
||||
|
@ -41,6 +41,7 @@ class U_I18N_API ConversionRateInfo : public UMemory {
|
|||
CharString baseUnit;
|
||||
CharString factor;
|
||||
CharString offset;
|
||||
CharString special;
|
||||
CharString systems;
|
||||
};
|
||||
|
||||
|
|
|
@ -2181,7 +2181,7 @@ static void TestFallback(void)
|
|||
UResourceBundle* myResB = ures_open(NULL,"no_NO_NY",&err);
|
||||
UResourceBundle* resLocID = ures_getByKey(myResB, "Version", NULL, &err);
|
||||
const UChar* version = NULL;
|
||||
static const UChar versionStr[] = u"44"; // 44 in nn_NO or in a parent bundle/root
|
||||
static const UChar versionStr[] = u"45"; // 45 in nn_NO or in a parent bundle/root
|
||||
|
||||
if(U_FAILURE(err)) {
|
||||
log_data_err("Expected success when trying to test no_NO_NY aliased to nn_NO for Version "
|
||||
|
|
|
@ -515,7 +515,7 @@ static const char *localeAndIndexCharactersLists[][2] = {
|
|||
/* Japanese*/ {"ja", "\\u3042:\\u304B:\\u3055:\\u305F:\\u306A:\\u306F:\\u307E:\\u3084:\\u3089:\\u308F"},
|
||||
/* Korean*/ {"ko", "\\u3131:\\u3134:\\u3137:\\u3139:\\u3141:\\u3142:\\u3145:\\u3147:\\u3148:\\u314A:\\u314B:\\u314C:\\u314D:\\u314E"},
|
||||
/* Lithuanian*/ {"lt", "A:B:C:\\u010C:D:E:F:G:H:I:J:K:L:M:N:O:P:R:S:\\u0160:T:U:V:Z:\\u017D"},
|
||||
/* Latvian*/ {"lv", "A:B:C:\\u010C:D:E:F:G:\\u0122:H:I:J:K:\\u0136:L:\\u013B:M:N:\\u0145:O:P:Q:R:S:\\u0160:T:U:V:W:X:Z:\\u017D"},
|
||||
/* Latvian*/ {"lv", "A:\\u0100:B:C:\\u010C:D:E:\\u0112:F:G:\\u0122:H:I:Y:\\u012A:J:K:\\u0136:L:\\u013B:M:N:\\u0145:O:P:Q:R:S:\\u0160:T:U:\\u016A:V:W:X:Z:\\u017D"},
|
||||
/* Norwegian Bokm\\u00E5l*/ {"nb", "A:B:C:D:E:F:G:H:I:J:K:L:M:N:O:P:Q:R:S:T:U:V:W:X:Y:Z:\\u00C6:\\u00D8:\\u00C5"},
|
||||
/* Dutch*/ {"nl", "A:B:C:D:E:F:G:H:I:J:K:L:M:N:O:P:Q:R:S:T:U:V:W:X:Y:Z"},
|
||||
/* Polish*/ {"pl", "A:B:C:\\u0106:D:E:F:G:H:I:J:K:L:\\u0141:M:N:O:\\u00D3:P:Q:R:S:\\u015A:T:U:V:W:X:Y:Z:\\u0179:\\u017B"},
|
||||
|
|
|
@ -5802,8 +5802,7 @@ void MeasureFormatTest::TestParseBuiltIns() {
|
|||
|
||||
// Prove that all built-in units are parseable, except "generic" temperature:
|
||||
MeasureUnit parsed = MeasureUnit::forIdentifier(unit.getIdentifier(), status);
|
||||
if (unit == MeasureUnit::getGenericTemperature() ||
|
||||
(unit == MeasureUnit::getBeaufort() && logKnownIssue("CLDR-16327", "beaufort currently not convertible"))) {
|
||||
if (unit == MeasureUnit::getGenericTemperature()) {
|
||||
status.expectErrorAndReset(U_ILLEGAL_ARGUMENT_ERROR);
|
||||
} else {
|
||||
status.assertSuccess();
|
||||
|
|
|
@ -313,7 +313,7 @@ ResourceBundleTest::TestConstruction()
|
|||
char *versionID1 = new char[1+strlen(version1)]; // + 1 for zero byte
|
||||
char *versionID2 = new char[1+ strlen(version2)]; // + 1 for zero byte
|
||||
|
||||
strcpy(versionID1, "44.0"); // hardcoded, please change if the default.txt file or ResourceBundle::kVersionSeparater is changed.
|
||||
strcpy(versionID1, "45.0"); // hardcoded, please change if the default.txt file or ResourceBundle::kVersionSeparater is changed.
|
||||
|
||||
strcpy(versionID2, "55.0"); // hardcoded, please change if the te_IN.txt file or ResourceBundle::kVersionSeparater is changed.
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ NewResourceBundleTest::TestConstruction()
|
|||
char *versionID1 = new char[1 + strlen(U_ICU_VERSION) + strlen(version1)]; // + 1 for zero byte
|
||||
char *versionID2 = new char[1 + strlen(U_ICU_VERSION) + strlen(version2)]; // + 1 for zero byte
|
||||
|
||||
strcpy(versionID1, "44.0"); // hardcoded, please change if the default.txt file or ResourceBundle::kVersionSeparater is changed.
|
||||
strcpy(versionID1, "45.0"); // hardcoded, please change if the default.txt file or ResourceBundle::kVersionSeparater is changed.
|
||||
|
||||
strcpy(versionID2, "55.0"); // hardcoded, please change if the te_IN.txt file or ResourceBundle::kVersionSeparater is changed.
|
||||
|
||||
|
|
|
@ -78,7 +78,9 @@ void UnitsDataTest::testGetAllConversionRates() {
|
|||
cri->sourceUnit.data(), cri->baseUnit.data(), cri->factor.data(), cri->offset.data());
|
||||
assertTrue("sourceUnit", cri->sourceUnit.length() > 0);
|
||||
assertTrue("baseUnit", cri->baseUnit.length() > 0);
|
||||
assertTrue("factor", cri->factor.length() > 0);
|
||||
if (!logKnownIssue("ICU-22655", "Implement support for Beaufort conversion")) {
|
||||
assertTrue("factor || special", cri->factor.length() > 0 || cri->special.length() > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
6
icu4c/source/test/testdata/root.txt
vendored
6
icu4c/source/test/testdata/root.txt
vendored
|
@ -12,9 +12,9 @@
|
|||
|
||||
root
|
||||
{
|
||||
Version { 44.0 }
|
||||
ExpectCLDRVersionAtLeast { 44.0 } // 'base' cldr version. Allow up to version =.=.* of this
|
||||
CurrentCLDRVersion { 44.0 } // Current CLDR version as of the test update. Warn if not an exact match.
|
||||
Version { 45.0 }
|
||||
ExpectCLDRVersionAtLeast { 45.0 } // 'base' cldr version. Allow up to version =.=.* of this
|
||||
CurrentCLDRVersion { 45.0 } // Current CLDR version as of the test update. Warn if not an exact match.
|
||||
|
||||
ShortLanguage { xxx }
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ public class AlphabeticIndexTest extends TestFmwk {
|
|||
/* Japanese*/ {"ja", "\u3042:\u304B:\u3055:\u305F:\u306A:\u306F:\u307E:\u3084:\u3089:\u308F"},
|
||||
/* Korean*/ {"ko", "\u3131:\u3134:\u3137:\u3139:\u3141:\u3142:\u3145:\u3147:\u3148:\u314A:\u314B:\u314C:\u314D:\u314E"},
|
||||
/* Lithuanian*/ {"lt", "A:B:C:\u010C:D:E:F:G:H:I:J:K:L:M:N:O:P:R:S:\u0160:T:U:V:Z:\u017D"},
|
||||
/* Latvian*/ {"lv", "A:B:C:\u010C:D:E:F:G:\u0122:H:I:J:K:\u0136:L:\u013B:M:N:\u0145:O:P:Q:R:S:\u0160:T:U:V:W:X:Z:\u017D"},
|
||||
/* Latvian*/ {"lv", "A:\u0100:B:C:\u010C:D:E:\u0112:F:G:\u0122:H:I:Y:\u012A:J:K:\u0136:L:\u013B:M:N:\u0145:O:P:Q:R:S:\u0160:T:U:\u016A:V:W:X:Z:\u017D"},
|
||||
/* Norwegian Bokm\u00E5l*/ {"nb", "A:B:C:D:E:F:G:H:I:J:K:L:M:N:O:P:Q:R:S:T:U:V:W:X:Y:Z:\u00C6:\u00D8:\u00C5"},
|
||||
/* Dutch*/ {"nl", "A:B:C:D:E:F:G:H:I:J:K:L:M:N:O:P:Q:R:S:T:U:V:W:X:Y:Z"},
|
||||
/* Polish*/ {"pl", "A:B:C:\u0106:D:E:F:G:H:I:J:K:L:\u0141:M:N:O:\u00D3:P:Q:R:S:\u015A:T:U:V:W:X:Y:Z:\u0179:\u017B"},
|
||||
|
|
|
@ -4675,8 +4675,7 @@ public class MeasureUnitTest extends CoreTestFmwk {
|
|||
|
||||
// Prove that all built-in units are parseable, except "generic" temperature
|
||||
// (and for now, beaufort units)
|
||||
if (unit == MeasureUnit.GENERIC_TEMPERATURE ||
|
||||
(unit == MeasureUnit.BEAUFORT && logKnownIssue("CLDR-16327", "beaufort currently not convertible"))) {
|
||||
if (unit == MeasureUnit.GENERIC_TEMPERATURE) {
|
||||
try {
|
||||
MeasureUnit.forIdentifier(unit.getIdentifier());
|
||||
Assert.fail("GENERIC_TEMPERATURE should not be parseable (BEAUFORT also currently non-parseable)");
|
||||
|
|
|
@ -162,6 +162,7 @@ public class ConversionRates {
|
|||
String target = null;
|
||||
String factor = null;
|
||||
String offset = "0";
|
||||
String special = null;
|
||||
String systems = null;
|
||||
for (int j = 0; simpleUnitConversionInfo.getKeyAndValue(j, key, value); j++) {
|
||||
assert (value.getType() == UResourceBundle.STRING);
|
||||
|
@ -175,18 +176,20 @@ public class ConversionRates {
|
|||
factor = valueString;
|
||||
} else if ("offset".equals(keyString)) {
|
||||
offset = valueString;
|
||||
} else if ("special".equals(keyString)) {
|
||||
special = valueString;
|
||||
} else if ("systems".equals(keyString)) {
|
||||
systems = value.toString(); // still want the spaces here
|
||||
} else {
|
||||
assert false : "The key must be target, factor, systems or offset";
|
||||
assert false : "The key must be target, factor, offset, special. or systems";
|
||||
}
|
||||
}
|
||||
|
||||
// HERE a single conversion rate data should be loaded
|
||||
assert (target != null);
|
||||
assert (factor != null);
|
||||
assert (factor != null || special != null);
|
||||
|
||||
mapToConversionRate.put(simpleUnit, new ConversionRateInfo(simpleUnit, target, factor, offset, systems));
|
||||
mapToConversionRate.put(simpleUnit, new ConversionRateInfo(simpleUnit, target, factor, offset, special, systems));
|
||||
}
|
||||
|
||||
|
||||
|
@ -204,13 +207,15 @@ public class ConversionRates {
|
|||
private final String target;
|
||||
private final String conversionRate;
|
||||
private final BigDecimal offset;
|
||||
private final String special;
|
||||
private final String systems;
|
||||
|
||||
public ConversionRateInfo(String simpleUnit, String target, String conversionRate, String offset, String systems) {
|
||||
public ConversionRateInfo(String simpleUnit, String target, String conversionRate, String offset, String special, String systems) {
|
||||
this.simpleUnit = simpleUnit;
|
||||
this.target = target;
|
||||
this.conversionRate = conversionRate;
|
||||
this.offset = forNumberWithDivision(offset);
|
||||
this.special = special;
|
||||
this.systems = systems;
|
||||
}
|
||||
|
||||
|
@ -249,6 +254,11 @@ public class ConversionRates {
|
|||
return conversionRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The special conversion system for this unit.
|
||||
*/
|
||||
public String getSpecial() { return special; }
|
||||
|
||||
/**
|
||||
* @return The measurement systems this unit belongs to.
|
||||
*/
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
package com.ibm.icu.dev.test.util;
|
||||
|
||||
public class DebugUtilitiesData extends Object {
|
||||
public static final String ICU4C_VERSION="74.1";
|
||||
public static final String ICU4C_VERSION="75.0.1";
|
||||
public static final int UDebugEnumType = 0;
|
||||
public static final int UCalendarDateFields = 1;
|
||||
public static final int UCalendarMonths = 2;
|
||||
|
|
|
@ -61,10 +61,10 @@
|
|||
<property name="specialsDir" value="${basedir}/../../../icu4c/source/data/xml"/>
|
||||
|
||||
<!-- Default value for ICU version (icuver.txt). Update this for each release. -->
|
||||
<property name="icuVersion" value="74.1.0.0"/>
|
||||
<property name="icuVersion" value="75.0.1.0"/>
|
||||
|
||||
<!-- Default value for ICU data version (icuver.txt). Update this for each release. -->
|
||||
<property name="icuDataVersion" value="74.1.0.0"/>
|
||||
<property name="icuDataVersion" value="75.0.1.0"/>
|
||||
|
||||
<!-- An override for the CLDR version string (icuver.txt and others). This will be
|
||||
extracted from the CLDR library used for building the data if not set here. -->
|
||||
|
|
|
@ -7,7 +7,7 @@ import static java.lang.Integer.parseInt;
|
|||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.ZoneId;
|
||||
import java.util.function.Function;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
@ -34,12 +34,13 @@ final class IcuFunctions {
|
|||
* <ul>
|
||||
* <li>args[0] = ISO date string (e.g. "2019-05-23")
|
||||
* <li>args[1] = Date field type name (e.g. "from")
|
||||
* <li>args[2] = Timezone for ISO date string, as CLDR canonical “long” time zone ID; Etc/UTC for most
|
||||
* </ul>
|
||||
*/
|
||||
static final NamedFunction DATE_FN =
|
||||
NamedFunction.create("date", 2, args -> {
|
||||
NamedFunction.create("date", 3, args -> {
|
||||
long millis =
|
||||
DateFieldType.toEnum(args.get(1)).toEpochMillis(LocalDate.parse(args.get(0)));
|
||||
DateFieldType.toEnum(args.get(1)).toEpochMillis(LocalDate.parse(args.get(0)), args.get(2));
|
||||
// Strictly speaking the masking is redundant and could be removed.
|
||||
int hiBits = (int) ((millis >>> 32) & 0xFFFFFFFFL);
|
||||
int loBits = (int) (millis & 0xFFFFFFFFL);
|
||||
|
@ -187,8 +188,9 @@ final class IcuFunctions {
|
|||
this.adjustFn = adjustFn;
|
||||
}
|
||||
|
||||
long toEpochMillis(LocalDate date) {
|
||||
return adjustFn.apply(date).toInstant(ZoneOffset.UTC).toEpochMilli();
|
||||
long toEpochMillis(LocalDate date, String tzid) {
|
||||
// Need to check whether Java ZoneId handles all CLDR canonical “long” time zone IDs
|
||||
return adjustFn.apply(date).atZone(ZoneId.of(tzid)).toInstant().toEpochMilli();
|
||||
}
|
||||
|
||||
static DateFieldType toEnum(String value) {
|
||||
|
|
|
@ -26,25 +26,63 @@
|
|||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@tender="false"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/tender ; values=false
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@from="(%W)"][@iso4217="(%W)"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$3
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($2, from)
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@from="(%W)"][@iso4217="(%W)"][@tender="false"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$3
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($2, from)
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@from="(%W)"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($3, from, Etc/UTC)
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@from="(%W)"][@tz="(%W)"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($3, from, $4)
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@from="(%W)"][@tender="false"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($3, from, Etc/UTC)
|
||||
; /CurrencyMap/$1/<FIFO>/tender ; values=false
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@from="(%W)"][@to="(%W)"][@iso4217="(%W)"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$4
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($2, from)
|
||||
; /CurrencyMap/$1/<FIFO>/to:intvector ; values=&date($3, to)
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@from="(%W)"][@to="(%W)"][@iso4217="(%W)"][@tender="false"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$4
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($2, from)
|
||||
; /CurrencyMap/$1/<FIFO>/to:intvector ; values=&date($3, to)
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@from="(%W)"][@tz="(%W)"][@tender="false"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($3, from, $4)
|
||||
; /CurrencyMap/$1/<FIFO>/tender ; values=false
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@to="(%W)"][@iso4217="(%W)"][@tender="false"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$3
|
||||
; /CurrencyMap/$1/<FIFO>/to:intvector ; values=&date($2, to)
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@from="(%W)"][@to="(%W)"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($3, from, Etc/UTC)
|
||||
; /CurrencyMap/$1/<FIFO>/to:intvector ; values=&date($4, to, Etc/UTC)
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@from="(%W)"][@to="(%W)"][@tz="(%W)"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($3, from, $5)
|
||||
; /CurrencyMap/$1/<FIFO>/to:intvector ; values=&date($4, to, $5)
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@from="(%W)"][@to="(%W)"][@to-tz="(%W)"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($3, from, Etc/UTC)
|
||||
; /CurrencyMap/$1/<FIFO>/to:intvector ; values=&date($4, to, $5)
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@from="(%W)"][@to="(%W)"][@tz="(%W)"][@to-tz="(%W)"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($3, from, $5)
|
||||
; /CurrencyMap/$1/<FIFO>/to:intvector ; values=&date($4, to, $6)
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@from="(%W)"][@to="(%W)"][@tender="false"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($3, from, Etc/UTC)
|
||||
; /CurrencyMap/$1/<FIFO>/to:intvector ; values=&date($4, to, Etc/UTC)
|
||||
; /CurrencyMap/$1/<FIFO>/tender ; values=false
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@from="(%W)"][@to="(%W)"][@tz="(%W)"][@tender="false"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($3, from, $5)
|
||||
; /CurrencyMap/$1/<FIFO>/to:intvector ; values=&date($4, to, $5)
|
||||
; /CurrencyMap/$1/<FIFO>/tender ; values=false
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@from="(%W)"][@to="(%W)"][@to-tz="(%W)"][@tender="false"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($3, from, Etc/UTC)
|
||||
; /CurrencyMap/$1/<FIFO>/to:intvector ; values=&date($4, to, $5)
|
||||
; /CurrencyMap/$1/<FIFO>/tender ; values=false
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@from="(%W)"][@to="(%W)"][@tz="(%W)"][@to-tz="(%W)"][@tender="false"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/from:intvector ; values=&date($3, from, $5)
|
||||
; /CurrencyMap/$1/<FIFO>/to:intvector ; values=&date($4, to, $6)
|
||||
; /CurrencyMap/$1/<FIFO>/tender ; values=false
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@to="(%W)"][@tender="false"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/to:intvector ; values=&date($3, to, Etc/UTC)
|
||||
; /CurrencyMap/$1/<FIFO>/tender ; values=false
|
||||
//supplementalData/currencyData/region[@iso3166="(%W)"]/currency[@iso4217="(%W)"][@to="(%W)"][@tz="(%W)"][@tender="false"]
|
||||
; /CurrencyMap/$1/<FIFO>/id ; values=$2
|
||||
; /CurrencyMap/$1/<FIFO>/to:intvector ; values=&date($3, to, $4)
|
||||
; /CurrencyMap/$1/<FIFO>/tender ; values=false
|
||||
//supplementalData/currencyData/fractions/info[@iso4217="(%W)"][@digits="(%N)"][@rounding="(%N)"][@cashDigits="(%N)"][@cashRounding="(%N)"] ; /CurrencyMeta/$1:intvector ; values=$2 $3 $4 $5
|
||||
//supplementalData/currencyData/fractions/info[@iso4217="(%W)"][@digits="(%N)"][@rounding="(%N)"][@cashRounding="(%N)"] ; /CurrencyMeta/$1:intvector ; values=$2 $3 $2 $4
|
||||
|
@ -147,6 +185,14 @@
|
|||
|
||||
# units.xml
|
||||
|
||||
//supplementalData/unitPrefixes/unitPrefix[@type="(%W)"][@symbol="(%W)"][@power10="(%A)"]
|
||||
; /convertUnits/$1/symbol ; values=$2
|
||||
; /convertUnits/$1/power10 ; values=$3
|
||||
|
||||
//supplementalData/unitPrefixes/unitPrefix[@type="(%W)"][@symbol="(%W)"][@power2="(%A)"]
|
||||
; /convertUnits/$1/symbol ; values=$2
|
||||
; /convertUnits/$1/power2 ; values=$3
|
||||
|
||||
//supplementalData/unitConstants/unitConstant[@constant="(%W)"][@value="(%A)"](?:[@status="%W"])?
|
||||
; /unitConstants/$1 ; values="$2"
|
||||
|
||||
|
@ -171,6 +217,10 @@
|
|||
; /convertUnits/$1/factor ; values="$3"
|
||||
; /convertUnits/$1/offset ; values=$4
|
||||
|
||||
//supplementalData/convertUnits/convertUnit[@source="(%W)"][@baseUnit="(%W)"][@special="(%A)"]
|
||||
; /convertUnits/$1/target ; values=$2
|
||||
; /convertUnits/$1/special ; values=$3
|
||||
|
||||
//supplementalData/convertUnits/convertUnit[@source="(%W)"][@baseUnit="(%W)"][@systems="(%W)"]
|
||||
; /convertUnits/$1/target ; values=$2
|
||||
; /convertUnits/$1/factor ; values=1
|
||||
|
@ -193,6 +243,11 @@
|
|||
; /convertUnits/$1/offset ; values=$4
|
||||
; /convertUnits/$1/systems ; values="$5"
|
||||
|
||||
//supplementalData/convertUnits/convertUnit[@source="(%W)"][@baseUnit="(%W)"][@special="(%A)"][@systems="(%W)"]
|
||||
; /convertUnits/$1/target ; values=$2
|
||||
; /convertUnits/$1/special ; values=$3
|
||||
; /convertUnits/$1/systems ; values="$4"
|
||||
|
||||
# note the following will go into metadata.txt, not units.txt
|
||||
//supplementalData/metadata/alias/(unit|usage)Alias[@type="(%A)"][@replacement="(%A)"][@reason="(%A)"]
|
||||
; /alias/$1/$2/reason ; values="$4"
|
||||
|
|
Loading…
Add table
Reference in a new issue