Comments (6)
👋 @bkeepers, "check the chicken - is it done?"
from reminders.
Thanks for the report. I just tried to create a test case for https://github.com/bkeepers/parse-reminder and it seems to parse your example fine.
I'll test it out here:
/remind me "check the chicken - is it done?" on 31st Oct at 10:30am
parse-reminder - a node module to parse natural language reminders into who, what, and when
from reminders.
@bkeepers set a reminder for Oct 31st 2018
from reminders.
@chris48s Very odd. I'm not able to duplicate it. I just pushed a test case to https://github.com/bkeepers/parse-reminder/compare/test-case-31st-oct and the test is passing.
If you can come up with a test case that reliably fails, I'd be happy to investigate further.
Also, side issue: Is there a way to unset/reschedule this now that this has happened?
2 options:
- Just set a new reminder, which will clear the old one.
- Remove the
reminder
label
parse-reminder - a node module to parse natural language reminders into who, what, and when
from reminders.
I see. In the case I've posted, it looks like the fact that the reminder text contains the string "Oct" confuses things.
If I change that test case to:
'remind me "check Oct BoundaryLine release - does it have GSS codes for CEDs?" on 31st Oct at 10:30am': {
who: 'me', when: new Date(2017, 9, 31, 10, 30, 0, 0), what: '"check Oct BoundaryLine release - does it have GSS codes for CEDs?"'
}
.. it becomes easy to see what has happened:
{
- "what": "\"check BoundaryLine release - does it have GSS codes for CEDs?\""
- "when": [Date: 2017-10-01T09:00:00.000Z]
+ "what": "\"check Oct BoundaryLine release - does it have GSS codes for CEDs?\""
+ "when": [Date: 2017-10-31T10:30:00.000Z]
"who": "me"
}
I accept this is an edge case because the string is somewhat ambiguous, but it is possible to construct some more unexpected examples. For example the following test case:
'remind me test prod again after next deploy - this may be fixed on 31st Oct at 10:30am': {
who: 'me', when: new Date(2017, 9, 31, 10, 30, 0, 0), what: 'test prod again after next deploy - this may be fixed'
}
parses the word "may" as the date, rather than the string "31st Oct", which I think would be unexpected behaviour for most users:
{
- "what": "test prod again after next deploy - this be fixed"
- "when": [Date: 2017-05-01T09:00:00.000Z]
+ "what": "test prod again after next deploy - this may be fixed"
+ "when": [Date: 2017-10-31T10:30:00.000Z]
"who": "me"
}
This is definitely a much more subtle bug than I first thought I was reporting, but it could be a useful improvement to try and address it. Perhaps if the input string contains >1 strings which could potentially be parsed as a timestamp, the one which describes the most specific timestamp should be used, rather than the first one in the string?
Another possible weighting factor could be proximity to the word "at" or "on". If there's >1 strings which could be parsed as a date and one of them comes after the word "on", that's probably the one we want.
from reminders.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
from reminders.
Related Issues (20)
- Use object destructuring in reminders.js
- Use template literals in reminders.js
- Update package.json
- Pull requests not supported HOT 1
- [Question] Syntax not working for me HOT 2
- doesn't work on PRs HOT 5
- Reminder timing off significantly HOT 2
- possible to set up recurring reminders? HOT 1
- An in-range update of eslint-plugin-import is breaking the build 🚨 HOT 5
- An in-range update of eslint-plugin-import is breaking the build 🚨 HOT 5
- An in-range update of chrono-node is breaking the build 🚨 HOT 7
- An in-range update of probot-metadata is breaking the build 🚨 HOT 2
- Support the Project Notes HOT 2
- App is broken? HOT 48
- Could disable reopen issue? HOT 1
- i
- Upgrade Probot to the latest version
- Missleading Readme HOT 1
- Track stats or usage?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reminders.