How much will I have to pay ?

This script computes the costs for one phone call using the german Telekom's new prices (since 01/96).

Usage

Select the according day and rate for your call and enter the start and end time of the call. This can also be done by clicking the "Now!" button at the beginning (respectively end) time of your call. If you enter a time manually, you should use the HH:MM:SS time format. Press the "Compute" button to display the time of the call, the total amount of units and the price you'll have to pay for this call. The "Defaults" button can be used to reset the form to its initial state.

Telekom Cost Computation

connected since Monday-Friday Saturday-Sunday
connected until City R50 R200 Fern (far)
day rate
time [sec] units
cost per unit [DM/100] to pay [DM]

About

In January, 1996 the German Telekom has changed the prices for phone calls. The new cost structure is somewhat confusing to most Telekom users. Moreover many people are very angry about the higher prices for inner-city calls. However, I wanted to build an easy-to-use tool for cost computation and while learning JavaScript I found it very useful to implement this tool.

Limitations

This script can be executed in any browser that provides embedded JavaScripts, but at the moment the Netscape(tm) browser (version 2.0) is the only browser doing so. There is no warranty for the code to work correctly. Especially the mathematical correctness of the computed costs can not be guaranteed (due to rounding operations). The script has been tested to work, but as with any kind of software there may be some bugs in it. If you find some bugs, please report to Thomas Koch. All computations are only valid for calls from germany, using the german Telekom. But the code can be easily changed to work for other countries. There is no strong input format checking, so don't wonder about JavaScript errors when entering wrong time formats. There have been reports about the "Now!" button not responding properly in the solaris(tm) version of Netscape 2.0, but I couldnt find nor fix the bug.
latest update : Tue Mar 12 12:08:23 MET 1996 by Thomas Koch