Git Product home page Git Product logo

datetime-distance's Introduction

datetime-distance

Python library to compare string distances between dates, timestamps, or datetime objects.

Part of the Dedupe.io cloud service and open source toolset for de-duplicating and finding fuzzy matches in your data.

Development

Install dev requirements with pip:

pip install dev-requirements.txt

Testing

pytest tests

All tests must pass.

datetime-distance's People

Contributors

derekeder avatar fgregg avatar jeancochrane avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

datetime-distance's Issues

Questions about returning log values

Two questions about the comparator's return values:

  1. For every resolution, we return the log of the delta between the two inputs (example here). This makes sense to me at the seconds resolution, where the distance is often very large, but is it also the right call for days, months, and years?

  2. We're taking the log of the difference (log(x - y)) as opposed to the difference of the logs (log(x) - log(y)). I'm unclear on the theory behind this choice so I don't know if it matters, but it's technically different than the example in the price comparator, which I based this calculation on. Is it fine like this?

Curious to hear your thoughts @fgregg. I won't be working on this until Tuesday, so no rush.

Test dayfirst and yearfirst

Seems like there is some circumstances where these are not behaving as expected when just using the parse_resolution method. Lets write some tests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.