Determines the ordinal number appropriate to the passed cardinal number.
JSV_ordinalSuffix(expCN [, suffixOnly])
expCN.ordinalSuffix([suffixOnly])
The ordinalSuffix function returns the appropriate
ordinal number for the
selected cardinal number.
If the optional argument suffixOnly
is passed,
then only the suffix is returned.
The ordinalSuffix function uses the following arguments.
Argument | Description |
expCN | A cardinal number |
suffixOnly | Optional. Boolean value that indicates whether the ordinal suffix (e.g., st) only should be returned. Default value is false. |
ordinal number n (1607) 1 : a number designating the place (as first, second or third) occupied by an item in an ordered sequence 2 : a number assigned to an ordered set that designates both the order of its elements and its cardinal number
cardinal number n (1591) 1 : a number (as 1, 5, 15) that is used in simple counting and that indicates how many elements there are in an assemblage 2 : the property that a mathematical set has in common with all sets that can be put in one-to-one correspondence with it
n/a
The following lines of code
var f = 54;
document.write(
"The cardinal number " + f +
" is written as the ordinal number " +
f + JSV_ordinalSuffix(f,true) );
var i = 0;
for (i=0; i<22; i++) {
document.write( i + JSV_ordinalSuffix(i) + " " );
}
produce
Copyright © 1998-2000 Roaring Fork Software. All rights reserved.