-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the documentation for the dateFormats
and timeFormats
configuration options
#956
Conversation
@sequba is this ready for review? |
be67d90
to
7938d91
Compare
No, it's not. It requires changes to the documentation. |
…umber of seconds' decimal places specified in the timeFormats configuration option
dateFormats
and timeFormats
configuration options
Performance comparison of head (28fde78) vs base (c43a7fe)
|
`dateFormats` is a list of formats supported by the parser | ||
inside HyperFormula. The default format is | ||
`['MM/DD/YYYY', 'MM/DD/YY']`. The separator is ignored and it can | ||
be any of the following: '-' (dash), ' ' (empty space), | ||
'/' (slash). | ||
|
||
Similar to `dateFormats`, `timeFormats` is a list of time formats | ||
supported by the parser. The default format is | ||
`['hh:mm', 'hh:mm:ss.sss']`. The only accepted separator is ':' (colon). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is described in the API ref for these configuration options. No need for duplication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified by:
- running the docs locally
- checking the test cases
- comparing the PR with the issue and the Slack thread
month: number, | ||
day: number, | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a fuller example that is actually a function? This snippet is not clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You commented on the removed lines. I also think this code snippet was useless. There is a full example of a custom parseDateTime
function in the next section (using Moment.js). Do you think, we need another example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, sorry.
However, the linked explanations in the docs:
- https://hyperformula.handsontable.com/api/interfaces/configparams.html#date-and-time
- https://hyperformula.handsontable.com/api/interfaces/configparams.html#stringifydatetime
- https://hyperformula.handsontable.com/api/interfaces/configparams.html#stringifyduration
are too shallow, in a way that they doesn't explain the return values.
If you could enhance that in the API reference, I think that would be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good, but the link to /api/interfaces/globals.html#datetime
gives a 404 to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that. It's fixed now.
@sequba see my response to #956 (comment) |
…ringifyDuration in the API reference
Codecov Report
@@ Coverage Diff @@
## develop #956 +/- ##
===========================================
+ Coverage 95.74% 95.79% +0.05%
===========================================
Files 161 161
Lines 14098 14094 -4
Branches 2977 2976 -1
===========================================
+ Hits 13498 13502 +4
+ Misses 584 576 -8
Partials 16 16
|
Context
dateFormats
more accurate (mention.
as a valid separator)timeFormats
more accuratetimeFormats: ['hh:mm:ss']
andtimeFormats: ['hh:mm:ss.sssss']
. I consider it to be a bug-fix.How has this been tested?
Types of changes
Related issue(s):
Checklist: