Closed jbfaden closed 1 year ago
I found a new route to get this working. If I take the entire code, then replace toMillisecondsSince1970(time) and now() with stubs, remove the Logger statements, it can translate.
If there's a way to make the symbols be TimeUtil.xxx(), it would be much easier to make the translation. It would probably be nice to have the functions in a special namespace anyway.
TimeUtil = {} TimeUtil.xxx = function (a) {return "yyy"+a} TimeUtil.xxx("q")
On Sun, Apr 10, 2022 at 8:16 AM Jeremy Faden @.***> wrote:
If there's a way to make the symbols be TimeUtil.xxx(), it would be much easier to make the translation. It would probably be nice to have the functions in a special namespace anyway.
— Reply to this email directly, view it on GitHub https://github.com/hapi-server/server-java/issues/4#issuecomment-1094259637, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUQ57RBFN5OQKQP6CGS5UDVELBBBANCNFSM5S7E76XA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thanks, Bob. When I do the URI_Templates code, I'll use this form, and then I'll go back to the TimeUtil script.
This was moved over to https://github.com/hapi-server/uri-templates/issues/13
This task is done. See https://github.com/hapi-server/uri-templates/issues/13. Closing.
TimeUtil.java was always intended to be ported to other languages, and I'm curious how the port to JavaScript would go. I've been using the site https://www.jsweet.org/jsweet-live-sandbox/ to convert the code piece by piece, because it isn't working for the entire code, and it produces somewhat unreadable code anyway.
This is a table of function name in Java and if it is ported to JavaScript: