enso/distribution/lib/Standard
Jaroslav Tulach 4465d63dd8
Improved polyglot Date support (#3559)
Significantly improves the polyglot Date support (as introduced by #3374). It enhances the `Date_Spec` to run it in four flavors:
- with Enso Date (as of now)
- with JavaScript Date
- with JavaScript Date wrapped in (JavaScript) array
- with Java LocalDate allocated directly

The code is then improved by necessary modifications to make the `Date_Spec` pass.

# Important Notes
James has requested in [#181755990](https://www.pivotaltracker.com/n/projects/2539304/stories/181755990) - e.g. _Review and improve InMemory Table support for Dates, Times, DateTimes, BigIntegers_ the following program to work:
```
foreign js dateArr = """
return [1, new Date(), 7]

main =
IO.println <| (dateArr.at 1).week_of_year
```
the program works with here in provided changes and prints `27` as of today.

@jdunkerley has provided tests for proper behavior of date in `Table` and `Column`. Those tests are working as of [f16d07e](f16d07e640). One just needs to accept `List<Value>` and then query `Value` for `isDate()` when needed.

Last round of changes is related to **exception handling**. 8b686b12bd makes sure `makePolyglotError` accepts only polyglot values. Then it wraps plain Java exceptions into `WrapPlainException` with `has_type` method - 60da5e70ed - the remaining changes in the PR are only trying to get all tests working in the new setup.

The support for `Time` isn't part of this PR yet.
2022-07-21 06:32:40 +00:00
..
Base/0.0.0-dev Improved polyglot Date support (#3559) 2022-07-21 06:32:40 +00:00
Database/0.0.0-dev Type name case fixes: (#3590) 2022-07-19 14:09:09 +00:00
Examples/0.0.0-dev Remove 'here' and make method name resolution case-sensitive (#3538) 2022-07-07 10:31:06 +00:00
Geo/0.0.0-dev Substitute this with self (#3524) 2022-06-21 10:53:52 +00:00
Google_Api/0.0.0-dev Substitute this with self (#3524) 2022-06-21 10:53:52 +00:00
Image/0.0.0-dev Type name case fixes: (#3590) 2022-07-19 14:09:09 +00:00
Searcher/0.0.0-dev Type name case fixes: (#3590) 2022-07-19 14:09:09 +00:00
Table/0.0.0-dev Type name case fixes: (#3590) 2022-07-19 14:09:09 +00:00
Test/0.0.0-dev Implement should_succeed (#3586) 2022-07-14 19:58:44 +00:00
Visualization/0.0.0-dev Type name case fixes: (#3590) 2022-07-19 14:09:09 +00:00