Comments (4)
Hello Xiaoli,
I patched chrono to recognize date with zero-padding (2013-02-07) as you suggested.
I have that IF statement for filtering some non-exsist date such as 2013-02-29.
[ var date = moment( '2013-02-29' , 'YYYY-MM-DD'); ] will return [March 1st] which is not correct answer in my opinion.
from chrono.
Hi berryboy, thanks for your quick fix. One more question, I also found chrono will return 12:00 if not found start/end hour, any reasons here?
from chrono.
As fas as I know, it's not recommend to mark the timestamp at the beginning of the day (midnight - 00:00). There are some case like - Day Time Saving on March 13, 2011 that skipped the time by one hour.
So, I think the safest timestamp to represent 'a day' is the middle of that day (or 12:00)
from chrono.
Yes, I think you are right at that point. However as chrono is a parser, so sometimes I don't know if chrono really extracted "12:00" from a given text or just return it by your above safest logic. Then the chrono may not be good to return "12:00" if the given text doesn't contain any time string, just my two cents.
from chrono.
Related Issues (20)
- Invalid parsing: `08/08/2023, 09:15 AM to 08/29/2023, 09:15 AM` HOT 2
- `mon` and `monday` no longer recognized HOT 1
- Accept next tuesday +10 days HOT 4
- Question: auThursday eptember 28 12:00 PM parsed as Sat Oct 07 2023 12:00:00 HOT 2
- Main branch failing test. HOT 3
- Cannot parse Month and Year HOT 3
- Update in package.json structure and Language Customization Feature
- de locale in parse function HOT 2
- Results are sometimes off by one day when setting time in JST but calling from a different timezone HOT 5
- Error parsing of local time in the Common Log Format (06/Nov/2023:06:36:02 +0200) HOT 1
- Incorrect parsing of Chinese for 'tomorrow morning at 8am' HOT 2
- feat: add support to unix timestamp HOT 2
- Incorrect Recognition of "in [month]" pattern HOT 1
- How to tell if result needs the time or not? HOT 2
- parseDate is incorrect for these inputs HOT 2
- Timezone parsing reference not working as expected with `forwardDate: true` specified
- Incorrect Parsing of "the money" as a Date HOT 1
- v1.x isCertain returns unexpected values
- Wrong result for a simple case
- [BUG] Month and day not recognized HOT 1
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 chrono.