Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 20:39
· 22 commits to main since this release

A column's date order, format strings for other tools, and a Python
package. All of it is new API: nothing that existed changed, and every input
parses to what it did in 0.2.1.

Added

  • detectColumn and Column: which order a column writes its numeric dates
    in, month, day or year first, from all of its values where one value
    cannot say. One 13/02/2024 settles day first for the whole column, and
    two-digit years narrow it together. The report gives the order, the value
    that settled it, any values that contradict it, and the Options that read
    the column in it. Column takes values one at a time and allocates
    nothing. In C: dateparsa_column_init, dateparsa_column_add and
    dateparsa_column_summarize.
  • Layout.dateOrder(): the order a numeric layout reads year, month and day
    in.
  • Layout.formatString(dialect, detected_from, writer): a detected format as
    another tool's format string, in strftime (C, Python, pandas, Ruby), Go or
    Java (also Kotlin and Spark) form, such as %d/%m/%Y %H:%M. A field a
    dialect cannot spell is error.Unsupported, never a string that reads
    something else. Every example in the format table is checked in Python, Go
    and Java by tools/format_check.sh. In C: dateparsa_format_string and
    the new status DATEPARSA_UNSUPPORTED.
  • A Python package, pip install dateparsa: wheels for Linux (glibc and musl),
    macOS 13 and later, and Windows, on x86_64 and arm64, for Python 3.9 and
    later, wrapping the release libraries with ctypes. parse, detect,
    Parser, Layout (with format_string), detect_column and Column,
    with options as keyword arguments, results as datetimes, and NoMatch,
    Ambiguous and NoBaseTime as ValueErrors. Every release installs each
    wheel on its platform and runs the tests before publishing to PyPI as a
    trusted publisher.