Code Monkey home page Code Monkey logo

Comments (8)

wanasit avatar wanasit commented on August 16, 2024

Thank you for letting me know about your problem.
Sure! German date pattern can be implemented, and I really like to do it.

It's on my to-do list. I'll work on this soon.

from chrono.

gizmo21 avatar gizmo21 commented on August 16, 2024

thx. i'll report back then when i have implemeted this into webos

from chrono.

gizmo21 avatar gizmo21 commented on August 16, 2024

I scanned through my mails a bit and in germany we also often write "wir treffen uns am 15." instead of "we'll meet us on the 15th" or we use "1." instead of "1th", so i added this . to the DateOnlyParser, and it works now :)

function DateOnlyParser(text,ref,opt){var PATTERN=/(\W|^)(the\s*)?([0-9]{1,2})(th|rd|nd|st|\.)(\W|$)/i; 

But i couldn't get "wir treffen uns am 15. September" to be recognized corectly it only parses "15." and uses this actual month (Fri Nov 15 2013 12:00:00 GMT+0100) .
Instead "wir treffen uns am 15 September" works (Sun Sep 15 2013 12:00:00 GMT+0200) though, but a daynumber without the point is not used in germany.
So "dd. MONTHNAME" does not work for now.

[Update] OK found the other part where the Pattern is named differently: (st|nd|rd|th) so i added it there too

(st|nd|rd|th|\.)

and now it seems to work :)

from chrono.

wanasit avatar wanasit commented on August 16, 2024

You should try edit MonthNameLittleEndianParser.js or MonthNameMiddleEndianParser.js instead of DateOnlyParser.js.

from chrono.

gizmo21 avatar gizmo21 commented on August 16, 2024

yeah i just searched in the minified.js with the other pattern on my webserver, now found it and seems to work- see [update] above

from chrono.

wanasit avatar wanasit commented on August 16, 2024

c02307a

from chrono.

gizmo21 avatar gizmo21 commented on August 16, 2024

thx a lot - i already tried it and it worked quite good for the date parsing in format dd.mm.yyyy but it does not recognise >>dd.mm.<< (like >>meet me on 15.11. for lunch<< for 15th Nov. ) , it thinks it's a time (like >>hh.mm<<) even if there is an ending point. Also the implemented month and day names (thx for that too) like Montag or Juni are not recognized or on your website: http://wanasit.github.io/pages/chrono/ . If i enter >>monday<< it works. Do i have to call these functions in special way to get names parsed in german ?

from chrono.

wanasit avatar wanasit commented on August 16, 2024

Thank you for your feedback.
As you may already know, it's still not perfect.

I'll keep improve it little by little. ( > _ O )

from chrono.

Related Issues (20)

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.