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
Implement the Date standard library #357
Conversation
One thing I am not sure of is that each |
It's not necessary. I would remove the |
I have a question how to get the local TimeZone. It blocked me. |
@MaxGraey |
It's a shame that I haven't reviewed this more thoroughly. Looking at it again I think that this went stale in my head because it needs so many managed objects to represent a single date, and a more C-like implementation with data living on the date objects felt more efficient. In general I think that this is a good approach as it passes all the tests, so wondering if you are still interested in continuing on this PR? |
@dcodeIO I'm very interested in this PR. The implementation of the date library referred the implementation of java date. If you think a more C-like implementation are more efficient. I would try it. |
That would be fantastic, yeah. To elaborate a bit on the C-likeness, there currently are instances of |
Also it will be ideal if you organize the code in such a way that it could be reused for Temporal proposal (https://github.com/tc39/proposal-temporal/tree/main/polyfill/lib) in future |
Oh, wasn't aware of this one. Interesting. |
@LiaoPeng Ah! Thank you very much for opening this! 😄 This is a ton of awesome work, it is super appreciated! 😄 While you work with @dcodeIO and @MaxGraey on building this out as a c-style API, and if you think it would take a while. I'd be interested in pulling this Date implementation into it's own library that could be That is of course, if you wouldn't mind me doing so (giving this PR and you full credit @LiaoPeng ) ? Or we could start it together? Whichever works! Thanks y'all! 😄 |
Signed-off-by: Liao.Peng <pengliao@live.cn>
ddf9ec9
to
43f9889
Compare
@torch2424 Hey,it would take a while. Your advice is good, just do it. Now I push new commit |
@LiaoPeng Ah! Thank you for rebasing! 😄 🙏
So just to confirm, you're okay with me using the code in the PR on a |
@torch2424 I am okey, |
Various Date functions have been implemented meanwhile, avoiding intermediary allocations. |
Implement the date standard library
Finished: