Re: Name for converter of units/currency

From: Date: Mon, 08 Jan 2001 13:11:48 +0000
Subject: Re: Name for converter of units/currency
References: 1 2  Groups: php.pear 
Request: Send a blank email to php-pear+get-868@lists.php.net to get a copy of this message
Hello Aaron, On Sun, Jan 07, 2001 at 11:37 -0500, Aaron Bush wrote: > > ----- Original Message ----- > From: <jmh3@linuxfreak.com> > To: <php-pear@lists.php.net> > Sent: Sunday, January 07, 2001 10:04 AM > Subject: Re: [PHP-PEAR] Name for converter of units/currency > > > > have you ever purchased something in quantity? things are sold on a per > > volume, length, mass, power, etc. basis all of the time. i think an > > international commerce site would benifit from being able convert /both/ > > at the same time. > > > > john > > Perhaps this functionality could be up to the user and they could extend the > class on their own. > Or some type of wrapper could be written that is intelligent enough to do > this at the top level. Okay, now I have the basic class that merely holds a conversion ratio and multiplies everything it is passed to by this ratio. This is the most widely required type of conversion between units, be them currency or physical ones. For classes that "know" what they're converting or implement more complex conversion schemes (say, Celsius to Fahrenheit), I suggest subclassing that minimalistic base. Name variants are still welcomed. 'Numbers_Units_Conv'? -- Stay tuned, MhZ mailto:mookid@sigent.ru ----------- Confess your sins to the Lord and you will be forgiven; confess them to man and you will be laughed at. -- Josh Billings

« previous php.pear (#868) next »