Giter VIP home page Giter VIP logo

date-parser's Introduction

date-parser's People

Contributors

alordash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

roninore

date-parser's Issues

New parseDate() overload

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.

Period times logic rework

Time periodicity information should be contained as array of objects.

  • Each object provides information about time type and a how much this time type should be increased when event should fire.
  • Objects are arranged in a hierarchical order. Less index -> higher hierarchy. When least periodic time object reaches it's maximum, it resets and triggers higher object in hierarchy.

Ordinals processing

"1ый", "2ой", "3ий", "1st", "2nd", "3rd", "4th" and e.g. should be treated as "1", "2", "3", "1", "2", "3" and "4".

One description for multiple times

When there is only one reminder description given and there are more than one parsedTimes, then all these parsedTimes should use that description

New regex

Add new regex for "today" and "сегодня".

Articles and prepositions ignoring

"the", "of" and e.g. should be ignored when applying regular expressions to simplified string, but used when forming events description.

Repeated events with every day on selected time

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...

Reproduce this bug on Smart Scheduler telegram bot:
image

P.S.:
image
only for joke

New parse case

Example: "каждые 5 минут до 8 утра".
target_date should be undefined, max_date.hours = 8, max_date.isFixed = true

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.