What programming strategy can be used, to find aporox rental total prixe,…the most efficient
Given date intervals and a rental price, this interval Not by month but arbitrary: eg 13-04-2017 till 17-05-2017 50$/day
Find the total rental cost, may a rental go to two even three intervals…
Prices are for last 2yrs
Mysql, php, js, jQuery
Find approx cost total with js client side I think is preferred, what you think?
2: Dynamically build a table of dates and their millisecond equivalents for the dates shown in the rates table. A small sample is shown below for the rental range 22 June 2014 to 2 July 2014
3: Extract the last entry as the total required. ($550)
While the test example prints out the millisecond table, when the script is used within another program, printing is not necessary, and the result is still available…
IE and Firefox have a problem with the syntax new Date(“2016, 4, 23”). To avoid this the example creates an empty date object and then sets the dates using standard javascript setDate, setMonth, setYear. Using this method allows the program to run in all browsers back to IE7.
A working example on JSFiddle of the program can be found HERE.
Please use valid dates and stay within the test data range as there is no error checking for this example.