alordash / date-parser Goto Github PK
View Code? Open in Web Editor NEWExtracts date from natural message.
Home Page: https://www.npmjs.com/package/@alordash/date-parser
License: MIT License
Extracts date from natural message.
Home Page: https://www.npmjs.com/package/@alordash/date-parser
License: MIT License
Add support for "in next month/year" cases.
(Currently there is support only for "in next %day_of_week%")
Time periodicity information should be contained as array of objects.
"test in 1.5 hours" creates reminder with 1 hour soffset
Add support for "In last day of %month%" case.
The title is clear.
Message "тест в 2ч," should be recognized as 2 hours.
Invalid parsedTimes contexts should be added to it's next neighbour (or previous, if it's last).
Add support for "Every odd/even day (other time type)".
Add support for "in Nth week day of month" case.
Hi, i don't understand this
каждый день в 23.30 текст
target_date: { ... hours: 23, minutes: 30, ... }
period_time: { ... dates: 1, ... }
it's good.
каждый 1 день в 23.30 текст
target_date: { all properties undefined }
period_time: { ... dates: 1, hours: 23, minutes: 30, ... }
i think it's not good...
Fix "in next ... (hour/day/week/month/year)" case processing.
When there is only one reminder description given and there are more than one parsedTimes, then all these parsedTimes should use that description
Unit tests should be described using new UnitTest()
.
"the", "of" and e.g. should be ignored when applying regular expressions to simplified string, but used when forming events description.
Add support for following parse cases:
Npm
Np.m
Np.m.
Nam
Na.m
Na.m.
Template: "... every X minutes N times"
If value of hours is >11, then mark it's parsedTime.isFixed as true.
"1ый", "2ой", "3ий", "1st", "2nd", "3rd", "4th" and e.g. should be treated as "1", "2", "3", "1", "2", "3" and "4".
Add overload that receives array of parsed words (new type) instead of string.
Word: { original: string, converted: string }
Parser should use original words from array when forming text.
Example: "каждые 5 минут до 8 утра".
target_date should be undefined, max_date.hours = 8, max_date.isFixed = true
Add new regex for "today" and "сегодня".
Let 1 month to be equal 30 days and add support for "Every X months" case.
"until MM:SS" case recognized incorrect.
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.