On Tuesday 16 May 2006 17:19, Mov GP 0 wrote:
> > Markus Kr=F6tzsch wrote:
> >
> > On Tuesday 16 May 2006 10:19, Tony Bowden wrote:
> > > I haven't seen any discussion of a Currency Type. A first stage for
> > > this might be to replicate Float, but allowing the unit to
> >
> > be a prefix
> >
> > > so we can say [[cost:=3DUSD 12]] or [[cost:=3D$ 12]] or
> >
> > [[cost:=3DCHF 103]] etc.
> >
> > > This certainly won't cover every situation, particularly as
> >
> > there are
> >
> > > some currencies where the value comes first, but I'm
> >
> > throwing it out
> >
> > > as a starting point for discussion...
> > >
> > > Thoughts?
> >
> > Three thoughts:
> > (1) We need to extend the parsing of the float type to cover this.
> > Note that prefixing currencies is common only in some languages.
>
> True. But Math is international valid - and in Math the unit is on the
> trail. But it should be possible to write a Parser that can parse the Val=
ue
> neverless if the currency ist written in prefix or postfix.
Well, (uppercase;) Math does not care where things are written.=20
Mathematically, km 12/h is the same as 12 km/h. But there are of course loc=
al=20
customs one should respect.
>
> > (2) Currency can be a problematic thing to annotate, since the real
> > value of each currency changes all the time. But the wiki database is
> > updated only on saving articles, i.e. even with automatic conversion
> > between common currencies, you would soon have wrong or outdated
> > values in the database. So a real comparison between EUR 10 and USD 12
> > is not to be achieved easily.
>
> Thats the biggest problem. But there are Webservices out there which
> are providing such calculations - optionally with respect to
> historical currency exchange dates. Personally I prefer [1]. The
> biggest problem here is that such a feature would depend on the
> Webserviceprovider.
>
> [1] http://www.gama-system.com/webservices/exchangerates.asmx
Yes, that would be a useful option; and technically interesting too. But it=
is=20
not so easy to integrate this into the architecture: instead of converting=
=20
values when they are stored, the conversion would have to take place when y=
ou=20
<ask> for data (e.g. goods sorted by *current* value). Imagine a wiki with =
a=20
couple of thousand goods (or companies) where you look for all companies=20
which are worth more than a billion USD -- you would have to send more than=
=20
1000 requests to this service at one time. And answering times would not be=
=20
reliable due to the Web in between ...
So you would need some kind of caching mechanism (maybe an in-wiki-value vs=
=2E=20
current-equivalent-value table in the database, which is continuously updat=
ed=20
by querying the webservice). Lot of new architecture to do such a thing ...
>
> > (3) Maybe currency values also behave slightly different from normal
> > decimal numbers. E.g. you would not want USD 3.4 but rather USD 3.40,
> > I guess.
>
> Thats a kind of formatting problem. I would recommend to use something
> like: [[cost:=3D"USD 12"|format=3D"*f.ff"|$ 12]]
>
> > And a workaround:
> > Currently, you can write [[cost:=3D12$|$ 12]] to get printed "$ 12"
> > where the system uses "12 $".
>
> Well, as I said already it shouldn't make any difference if the unit
> is prefix or postfix. Also we should use ISO 4217 (three letter
> curreny) only - currency symbols are not that good, because they are
> overused in different Countries.
Obviously, since there are only a handful of dedicated currency symbols. Bu=
t=20
this would be a minor problem and mapping $ to one default interpretation=20
could even be done via a message that can be edited by the wiki admin (who=
=20
can easily edit all messages via the wiki since MediaWiki 1.6).
Best regards,
Markus
>
> Ie. the letter "$" () is used for the currencies USD, ARS, AUD,
> BBD, BZD, BOB, BND, CAD, KYD, CLP, XCD, FJD, GYD, HKD, JMD, LRD, MXN,
> NAD, NZD, SGD, SBD, SRD, TTD, TVD, and ZWD.
>
>
> ys, MovGP0
>
> > Regards
> >
> > Markus
> >
> > > Tony
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > Using Tomcat but need to do more? Need to support web
> >
> > services, security?
> >
> > > Get stuff done quickly with pre-integrated technology to
> >
> > make your job
> >
> > > easier Download IBM WebSphere Application Server v.1.0.1 based on
> > > Apache Geronimo
> >
> > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D1216
> >
> > > 42 _______________________________________________
> > > Semediawiki-devel mailing list
> > > Semediawiki-devel@...
> > > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
> >
> > --
> > Markus Kr=F6tzsch
> > Institute AIFB, University of Karlsruhe, D-76128 Karlsruhe
> > mak@... phone +49 (0)721 608 7362
> > http://www.aifb.uni-karlsruhe.de/WBS/ fax +49 (0)721 693 717
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=120709&bid&3057&da=
t=121642
> _______________________________________________
> Semediawiki-devel mailing list
> Semediawiki-devel@...
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
=2D-=20
Markus Kr=F6tzsch
Institute AIFB, University of Karlsruhe, D-76128 Karlsruhe
mak@... phone +49 (0)721 608 7362
http://www.aifb.uni-karlsruhe.de/WBS/ fax +49 (0)721 693 717
|