<!-- Built-In Functions for Apps --> <script type="text/javascript"> var localStoragePrefix = "ct-169030165391496"; var lastSave = 0; // save to localstorage function saveLocal(data) { if (Date.now() - lastSave < 1000) { return; } // save to cookie let cookie = localStoragePrefix + "=" + JSON.stringify(data) + "; path=" + window.location.pathname + "'; SameSite=Strict"; cookie += "; expires=" + new Date(Date.now() + 1000 * 60 * 60 * 24 * 365 * 1000).toUTCString(); document.cookie = cookie; lastSave = Date.now(); }
// load from localstorage function loadLocal() { var cookiePrefix = localStoragePrefix + "="; var cookieStart = document.cookie.indexOf(cookiePrefix); if (cookieStart > -1) { let cookieEnd = document.cookie.indexOf(";", cookieStart); if (cookieEnd == -1) { cookieEnd = document.cookie.length; } var cookieData = document.cookie.substring(cookieStart + cookiePrefix.length, cookieEnd); return JSON.parse(cookieData); } }
// Calculate Total Trip Hours function calculateTotalTripHours(departureTime, arrivalTime) { var totalHours = 24; if (departureTime !== "" && arrivalTime !== "") { var departureDate = new Date(departureTime); var arrivalDate = new Date(arrivalTime); if (departureDate.toDateString() === arrivalDate.toDateString()) { totalHours = 24; } else { totalHours = Math.abs(arrivalDate - departureDate) / 3600000; } } return totalHours; }
// Calculate Number of Vehicles function calculateNumberOfVehicles(totalPassengers) { var numberOfVehicles = Math.ceil(totalPassengers / 55); return numberOfVehicles; }
// Check if Overnight function isOvernight(totalHours, numberOfVehicles, departureTime, arrivalTime) { if (totalHours > 18 || (numberOfVehicles > 1 && departureTime !== "" && arrivalTime !== "" && new Date(arrivalTime) > new Date(departureTime))) { return true; } else { return false; } }
var rate = rates[rateTable][estimatedDrivingTime.toString()]; var cost = rate * Math.max(estimatedDrivingTime, 3); return cost; }
// Calculate Gratuity per Driver, per Bus, per Day function calculateGratuityPerDriverPerBusPerDay(numberOfVehicles, estimatedDrivingTime) { var numberOfDrivers = Math.max(1, numberOfVehicles); var gratuity = numberOfDrivers * 40; if (estimatedDrivingTime > 9) { gratuity += (estimatedDrivingTime - 9); } return gratuity; }
// Calculate Cost of Relief Driver function calculateCostOfReliefDriver(estimatedDrivingTime, numberOfVehicles) { if (estimatedDrivingTime > 9) { var cost = estimatedDrivingTime * 98.33 * numberOfVehicles; return cost; } else { return 0; } }
// Calculate Grand Total Cost of Round Trip function calculateGrandTotalCostOfRoundTrip(costBasedOnRate, gratuityPerDriverPerBusPerDay, costOfReliefDriver) { var grandTotalCost = costBasedOnRate + gratuityPerDriverPerBusPerDay + costOfReliefDriver; return grandTotalCost; }
// Calculate Trip Details function calculateTripDetails() { var departureTime = $("#departure-time").val(); var arrivalTime = $("#arrival-time").val(); var totalPassengers = parseInt($("#total-passengers").val()); var rateTable = $("#rate-table").val(); var location = $("#location").val(); var estimatedDrivingTime = parseFloat($("#estimated-driving-time").val());
var totalHours = calculateTotalTripHours(departureTime, arrivalTime); var numberOfVehicles = calculateNumberOfVehicles(totalPassengers); var isOvernightTrip = isOvernight(totalHours, numberOfVehicles, departureTime, arrivalTime); var costBasedOnRate = calculateCostBasedOnRate(rateTable, location, estimatedDrivingTime); var gratuityPerDriverPerBusPerDay = calculateGratuityPerDriverPerBusPerDay(numberOfVehicles, estimatedDrivingTime); var costOfReliefDriver = calculateCostOfReliefDriver(estimatedDrivingTime, numberOfVehicles); var grandTotalCostOfRoundTrip = calculateGrandTotalCostOfRoundTrip(costBasedOnRate, gratuityPerDriverPerBusPerDay, costOfReliefDriver);
Calculator Tools allows you to instantly create and generate any simple one page web app for
free and immediately have it online to use and share. This means anything! Mini apps,
calculators, trackers, tools, games, puzzles, screensavers... anything you can think of that the
AI can handle.
The AI uses Javacript, HTML, and CSS programming to code your app up in moments. This currently
uses GPT-4 the latest and most powerful version of the OpenAI GPT language model.
What Do You Mean Make An App?
Have you ever just wanted a simple app but didn't want to learn programming or pay someone to
make it for you? Calculator Tools is the solution! Just type in your prompt and the AI will
generate a simple app for you in seconds. You can then customize it to your liking and share it
with your friends.
AI has become so powerful it is that simple these days.
Does This Use ChatGPT?
It uses GPT-4 which is the most powerful model for ChatGPT.
Calculator Tools does not remember things from prompt to prompt, each image is a unique image
that does not reference any of the images or prompts previously supplied.