enso/test/Table_Tests/data/prime_ministers.csv

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
374 B
Plaintext
Raw Normal View History

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](https://github.com/enso-org/enso/pull/3559/commits/f16d07e640c12721eb329a797a19c7b46bbf3fbc). One just needs to accept `List<Value>` and then query `Value` for `isDate()` when needed. Last round of changes is related to **exception handling**. https://github.com/enso-org/enso/pull/3559/commits/8b686b12bdc1113e07ff37bc780df960aae34039 makes sure `makePolyglotError` accepts only polyglot values. Then it wraps plain Java exceptions into `WrapPlainException` with `has_type` method - https://github.com/enso-org/enso/pull/3559/commits/60da5e70ed58db55e00bf82f57f47063a6d1e587 - 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 09:32:40 +03:00
Number,Party,Title,From,To
71,Conservative,Margaret Thatcher,1979-05-04,1990-11-28
72,Conservative,John Major,1990-11-28,1997-05-02
73,Labour,Tony Blair,1997-05-02,2007-06-27
74,Labour,Gordon Brown,2007-06-27,2010-05-11
75,Conservative,David Cameron,2010-05-11,2016-07-13
76,Conservative,Theresa May,2016-07-13,2019-07-24
77,Conservative,Boris Johnson,2019-07-24,2022-07-07