Обсуждение: ordinal decimal number
Hi,
I add to the to_char() routine "ordinal-number" feature, but my
English is insufficient for this :-( (sorry)
I good know how is it for non-decimal numbers, but if number has
decimal part?
Example: 2.6 --> 2.6th or 2.6 --> 2.6nd
Please!
Karel
----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/
Docs: http://docs.linux.cz (big docs archive)
Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)
FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)
-----------------------------------------------------------------------
> Hi, > > I add to the to_char() routine "ordinal-number" feature, but my > English is insufficient for this :-( (sorry) There are enough people that speak English, what we don't have enough of on this world are people that know what they can and can't do :) > I good know how is it for non-decimal numbers, but if number has > decimal part? > > Example: 2.6 --> 2.6th > or 2.6 --> 2.6nd It's: 2.6 --> 2.6th Joost Roeleveld
"J. Roeleveld" wrote: >> Hi, >> >> I add to the to_char() routine "ordinal-number" feature, but my >> English is insufficientfor this :-( (sorry) > >There are enough people that speak English, what we don't have enough >of on this worldare people that know what they can and can't do :) > >> I good know how is it for non-decimal numbers, but if numberhas >> decimal part? >> >> Example: 2.6 --> 2.6th >> or 2.6 --> 2.6nd > >It's: 2.6 --> 2.6th It isn't really possible to have an ordinal with decimal places in English; it sounds very awkward. Ordinals designate placing in a list; a computer example would be an array index. How can such a number have decimal places? -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP key from public servers; key ID32B8FAA1 ======================================== "And thou shalt love the LORD thy God with all thine heart, and with all thy soul, and with all thy might." Deuteronomy 6:5
On Wed, 5 Jan 2000, Oliver Elphick wrote:
> "J. Roeleveld" wrote:
> >> Hi,
> >>
> >> I add to the to_char() routine "ordinal-number" feature, but my
> >> English is insufficient for this :-( (sorry)
> >
> >There are enough people that speak English, what we don't have enough
> >of on this world are people that know what they can and can't do :)
> >
> >> I good know how is it for non-decimal numbers, but if number has
> >> decimal part?
> >>
> >> Example: 2.6 --> 2.6th
> >> or 2.6 --> 2.6nd
> >
> >It's: 2.6 --> 2.6th
>
> It isn't really possible to have an ordinal with decimal places in
> English; it sounds very awkward.
>
> Ordinals designate placing in a list; a computer example would be an
> array index. How can such a number have decimal places?
I implement it to to_char (ordinal with decimal places), but is user choise
if use or not use it...
Karel
Karel Zak - Zakkr wrote: > > On Wed, 5 Jan 2000, Oliver Elphick wrote: > > > "J. Roeleveld" wrote: > > >> Hi, > > >> > > >> I add to the to_char() routine "ordinal-number" feature, but my > > >> English is insufficient for this :-( (sorry) > > > > > >There are enough people that speak English, what we don't have enough > > >of on this world are people that know what they can and can't do :) > > > > > >> I good know how is it for non-decimal numbers, but if number has > > >> decimal part? > > >> > > >> Example: 2.6 --> 2.6th > > >> or 2.6 --> 2.6nd > > > > > >It's: 2.6 --> 2.6th > > > > It isn't really possible to have an ordinal with decimal places in > > English; it sounds very awkward. > > > > Ordinals designate placing in a list; a computer example would be an > > array index. How can such a number have decimal places? I guess they are awkward in most languages, except for designating powers where they _could_ be used by extension of their use for integer powers? e raised to the pi-th power ? btw, should 2.2 be 2.2nd or 2.2th (two point tooth :) what about rationals 7 2/3 th ? what about legal float numbers like infinity (is it infinitieth) and NaN - NaN-th or NaNd :) for me 2.2nd represents not decimal but hierrachy, so it should be possible to have 2.2.2.2nd > I implement it to to_char (ordinal with decimal places), but is user choise > if use or not use it... Is your code locale-aware ? I guess that this is something that could probbaly be found in localisation tables, except perhaps for floats. ------------------ Hannu
On Wed, 5 Jan 2000, Hannu Krosing wrote:
> I guess they are awkward in most languages, except for designating powers
> where they _could_ be used by extension of their use for integer powers?
>
> e raised to the pi-th power ?
>
> btw, should 2.2 be 2.2nd or 2.2th (two point tooth :)
>
> what about rationals 7 2/3 th ?
>
> what about legal float numbers like infinity (is it infinitieth)
> and NaN - NaN-th or NaNd :)
>
> for me 2.2nd represents not decimal but hierrachy, so it should be possible to
> have
> 2.2.2.2nd
>
> > I implement it to to_char (ordinal with decimal places), but is user choise
> > if use or not use it...
>
> Is your code locale-aware ?
>
> I guess that this is something that could probbaly be found in localisation
> tables,
> except perhaps for floats.
(IMHO) POSIX locale not contains information about ordinal numbers (if
you mean this). But to_char supports locales for currency symbol, decimal
poin and group separator.
Karel