Code Monkey home page Code Monkey logo

abbreviated_dates's Introduction

๐Ÿฆ‘ ๐Ÿฆ‘

abbreviated_dates's People

Contributors

crgz avatar github-actions[bot] avatar jffjhnsn avatar

Stargazers

 avatar  avatar

Forkers

jffjhnsn

abbreviated_dates's Issues

Add support for certain date formats using month name

When trying to parse the following date ranges, I'm getting no results from the abbreviated_dates parser:

Format Example
'x, 0 x - x, 0 x' 'Thursday, 16 Jun - Friday, 17 Jun'
'x, 0. x - x, 0. x' 'Thursday, 16. June - Friday, 17. June'
'x, 0. x - x, 0. x' 'Thursday, 16. Jun - Friday, 17. Jun'
'0 x - 0 x' '16 Jun - 17 Jun'
'0. x - 0. x' '16. June - 17. June'
'0. x. - 0. x.' '16. Jun. - 17. Jun.'
'0. x - 0. x' '16. Jun - 17. Jun'
'x 0 - x 0' 'Jun 16 - Jun 17'

To narrow it down further, here are the relevant single day cases. An x indicates that the parse was successful:

With only day number and month name:

Date Success
17 June x
17 Jun
17 Jun. x
17. June
17. Jun
17. Jun.
June 17 x
Jun 17
Jun. 17 x

With weekday name, day number and month name:

Date Success
Friday, 17 June x
Friday, 17 Jun
Friday, 17 Jun. x
Friday, 17. June x
Friday, 17. Jun
Friday, 17. Jun. x

Add support for "/" as day-month separator

Recently, I came across the following date format (which was indicating Thursday, 6 October):

Thu, 06/10

However, it does not parse, since / isn't included as a possible date separator.

This can be resolved by adding / to the separator rule in abbreviated_dates.pl, i.e.

separator --> "-"|"."|"/"|" ".

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.