-
Notifications
You must be signed in to change notification settings - Fork 603
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
Date (skeletons): handle date and time in the same skeleton #272
Comments
@rxaviers sir, I see ibm-js/ecma402/issues/76 have already implemented I would like to take this up if possible. |
Yeap, this issue isn't about the presets. But, skeletons.
@manrajgrover note there's a difference between skeletons and raw patterns. A skeleton is mapped into a raw pattern. For example,
I'm looking for a solution that extends date/expand-pattern. |
@rxaviers sir, Ohkay sir. So basically the pattern should be entered in canonical form and then should be extracted and processed, right? The method mentioned in this can be used but it does not say anything about the time. What if user wants dates I would suggest we take each date and time separately and then concatenate them. One more thing is if either date nor time don't exist, should we throw an error or give a closest form of datetime? How to do that? I went through the code given in date/expand-pattern and saw we can handle these in |
Correct.
We won't handle the combination of different values for date and time separately.
Correct. Just let me know in any questions. |
@rxaviers sir, We can check if it is date or time or datetime. if(skeleton.isDate() != skeleton.isTime()){
then do default search for result
else if(skeleton.isDateTime()){
then follow four if cases listed above.
} Last case is default I shall start working on it. |
Yeap, your high level sketchup seems correct. Looking forward to it. Thanks |
@rxaviers sir, I have almost completed the feature. It is throwing error for the case containing |
Have you loaded all the required CLDR data for the Date module? |
Why do you need to return
I'm confused why are checking Can you handle |
@rxaviers sir, According to the link, there are 4 cases, first one being when skeleton has |
It's not saying you should use |
I assume you have seen this data. But, just in case http://www.unicode.org/repos/cldr-aux/json/26/main/en/ca-gregorian.json |
Yes sir. I have been following this only and have inferred the data from this and the link I mentioned before working. Sir, by "glue" pattern you mean? |
|
Yeps. I have used them only. Should I send a PR? That will help clear things. |
Great then. Yeap, please do so. |
Currently, it's possible to:
Although,
.formatDate( date, "MMMdhm" )
isn't. But, it should.http://www.unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems
See also: ibm-js/ecma402#76
The text was updated successfully, but these errors were encountered: