Skip to content

Commit 85a4d56

Browse files
authored
Merge pull request #289 from mP1/feature/README-redundant-empty-lines-removed
README redundant empty lines removed
2 parents be1a7b9 + 6bbe961 commit 85a4d56

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

README.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,18 @@
66
![](https://tokei.rs/b1/github/mP1/j2cl-java-text)
77
[![J2CL compatible](https://img.shields.io/badge/J2CL-compatible-brightgreen.svg)](https://github.com/mP1/j2cl-central)
88

9-
10-
119
# java.text j2cl
1210

1311
This aims to provide most of the basics of the `java.text` package. Note while most of the core functionality is present,
1412
some parts are methods are missing. Care should be taken when selecting locales and other extracted data to avoid
1513
very large amounts of data being extracted resulting in javascript with huge strings holding this data.
1614

17-
18-
1915
## DecimalFormat
2016

2117
Note there are some differences between the JDK and emulated DecimalFormat. Where possible behaviour is matched using black box approach,
2218
with multiple tests that perform the same operation with the same parameters and then compare state or results such as
2319
output from format or parse.
2420

25-
26-
2721
### pattern parsing
2822

2923
The JDK DecimalFormat parse of patterns has some strange quirks resulting in the negative suffix in the pattern being ignored,
@@ -33,13 +27,10 @@ and empty string returned. An example of this counter intuitive behaviour is giv
3327
new java.text.DecimalFormat("P#S;PP##SS").getNegativeSuffix() // returns empty and not SS
3428
```
3529

36-
3730
### parse string with number
3831

3932
The minimumIntegerDigits, maximumFractionDigits and minimumFractionDigits are not actually honoured by `DecimalFormat.parse`.
4033

41-
42-
4334
This example demonstrates that the minimumIntegerDigit count is ignored during parsing and the number returned.
4435

4536
```java
@@ -50,8 +41,6 @@ f.parse("1"); // returns 1
5041

5142
```
5243

53-
54-
5544
This example demonstrates that the maximumFractionDigits count is ignored, because the string has more fraction digits
5645
than the pattern.
5746

@@ -63,7 +52,6 @@ f.parse("1.25"); // returns 1.25
6352

6453
```
6554

66-
6755
This example demonstrates that the maximumFractionDigits count is ignored, because the string has less fraction digits
6856
than the pattern.
6957

@@ -77,23 +65,18 @@ f.parse("1.5"); // returns 1.5
7765

7866
To match compatibility the behaviour of ignoring the counts are ignored.
7967

80-
81-
8268
## SimpleDateFormat
8369

8470
Is an almost complete replacement for `java.text.SimpleDateFormat` supporting formatting and parsing pattern letters.
8571

8672
- `java.text.ParsePosition` index and errorIndex is supported and matches the behaviour or the JRE class.
8773
- WEEK_YEAR which is represented by the pattern letter "Y" [TODO format](https://github.com/mP1/j2cl-java-text/issues/216) [TODO parse](https://github.com/mP1/j2cl-java-text/issues/219)
8874

89-
90-
9175
```java
9276
SimpleDateFormat f = new SimpleDateFormat("dd/MM/yyyy");
9377
f.parse("31/12/1999") // gives a Date with 31 December 1999.
9478
```
9579

96-
9780
## Annotation processor arguments
9881

9982
- See [j2cl-java-util-currency-annotation-processor](https://github.com/mP1/j2cl-java-util-locale-annotation-processor) for more info about selecting which currencies get bundled.
@@ -102,8 +85,6 @@ f.parse("31/12/1999") // gives a Date with 31 December 1999.
10285

10386
The currency code `XXX` must be selected as it is used by various `java.text` classes as a source of defaults.
10487

105-
106-
10788
## Missing functionality
10889

10990
For the moment the following classes will not be supported:
@@ -127,11 +108,7 @@ For the moment the following classes will not be supported:
127108

128109
- Serialization is not supported, and all support classes and forms including magic methods such as `writeReplace` are removed.
129110

130-
131111
### Transpiling
132112

133113
The `j2cl-maven-plugin` will shade the source during the transpile phase, so `walkingkooka.j2cl.java.text`
134114
is available to the runtime as `java.text`.
135-
136-
137-

0 commit comments

Comments
 (0)