I have a VB6 source code file of 2310 lines long ( including comments), to be converted into Javascript. There are also 16 datafiles in XML format that are used by this code.
The code's purpose is to create a speakable sentence that says what holidays happen today. The datafiles contain information about when those holidays occur. It also appends to the sentence some other features like commenting on what day of the week it is, whether it's daylight savings time, whether it's TGIF friday, and things like that.
Your job is not expected to make it speak. You job is only to create a sentence that the function can return.
You will not be receiving the entire VB6 project, nor the entire javascript environment that can speak sentences. You will only receive just the pertinent files regarding dates. So you won't be able to test the output in the intended environment. Instead, it's up to you to test it in a different way, like in a webpage or a javascript sandbox like jsfiddle.
The VB6 code is simple linear functions, NOT object-oriented, and I want the Javascript to be in the same style. I hate object-oriented anything. The VB6 code uses some global variables, and the Javascript can use globals too.
For Javascript comments, I like // style.
If the VB6 uses IF..ELSEIF..ELSE, then let the Javascript use that too. Don't re-shape those into Switch Case or arrays or other fancy tricks.
Keep the functions in approximately the same order. Don't embed functions within functions.
The