chaitanyagupta / chronicity Goto Github PK
View Code? Open in Web Editor NEWA natural language date and time parser for Common Lisp
License: Other
A natural language date and time parser for Common Lisp
License: Other
Please consider adding :description, :author and :license information to your ASDF system(s). This will greatly help Quicklisp users and make it easier for them to report bugs.
More information:
http://blog.quicklisp.org/2015/05/looking-for-more-metadata.html
https://www.quicklisp.org
`(chronicity:parse “a month ago” :now (chronicity:make-date 2009 5 31))` signals an error. Ideally it should return 2009-04-30T00:00:00 or 2009-05-31T00:00:00.
More specifically, this is the problem (eval in CHRONICITY package): `(datetime-decr (make-date 2009 5 31) :month)`
When running the tests, I am seeing 3 execution errors as shown here:
http://paste.pocoo.org/show/285515/ in CCL trunk.
Environment:
Welcome to Clozure Common Lisp Version 1.6-dev-r14397M-trunk (DarwinX8664)!
uname -a
=> Darwin Victoria.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
“Second” can either refer to the unit of time or the ordinal 2nd. Right now, we just assume it is the unit of time and ignore the ordinal.
A possible fix for this is to preprocess the tokens (before calling TOKENS-TO-SPAN) and tag any “second” followed by a repeater to be the ordinal 2nd.
It seems that only English is supported, right? Would it be easy to expand for other languages?
Current local-time implementation leads to BST being mapped to historical Samoa subzone instead of British summer time. I've opened a pull request dlowe-net/local-time#89 to address this issue in local-time.
Please review and use new public API when PR is merged.
DATETIME-MONTH+ uses LOCAL-TIME::INVALID-TIME-SPECIFICATION which is an unexported symbol in the local-time package. Either get the maintainers of local-time to export it or do something else. Cannot make a new release till this is fixed.
parsing "today" or "this day" return now and not the day of now.
(chronicity:parse "today" :now (local-time:encode-timestamp 0 0 30 12 13 2 2020))
@2020-02-13T12:30:00.000000+01:00
(#<CHRONICITY::TOKEN this [GRABBER] {1004470383}>
#<CHRONICITY::TOKEN day [REPEATER-DAY] {10044703C3}>)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.