Numeric Filters

Numeric Filters

Numeric filters work with numbers to do some incredible things. For those that hate numbers you can convert them to pretty strings, for those that like them you can do all kinds of crazy math using them.

 

AtLeast

Show Details
Server: v9.0

Limits a number to a minimum value.

 

AtMost

Show Details
Server: v9.0

Limits a number to a maximum value.

 

Ceiling

Show Details
Server: v4.0

Takes a number and returns the next largest integer.

 

DividedBy

Show Details
Server: v1.0

Divides a number by the number provided.

 

Floor

Show Details
Server: v4.0

Takes a number and returns the next smallest integer.

 

Format

Show Details
Server: v4.0

Formats the number based on a pattern your provide.

 

FormatAsCurrency

Show Details
Server: v4.0

Provides a simple way to display an internationalized currency amount. The filter uses the currency symbol defined in the 'CurrencySymbol' global attribute.

 

Minus

Show Details
Server: v1.0

Subtracts a number from the number provided.

 

Modulo

Show Details
Server: v1.0

The modulo filter returns the remainder of division of one number by another.

 

NumberToOrdinal

Show Details
Server: v1.0

Takes 1, 2 or 3 and returns 1st, 2nd or 3rd.

 

NumberToOrdinalWords

Show Details
Server: v1.0

Takes 1, 2 or 3 and returns first, second or third.

 

NumberToRomanNumerals

Show Details
Server: v1.0

For those latin lovers, this filter takes a number and returns it's roman numeral equivalent.

 

NumberToWords

Show Details
Server: v1.0

Takes 1, 2 or 3 and returns one, two or three.

 

Plus

Show Details
Server: v1.0

Adds a number to the number provided.

 

Times

Show Details
Server: v1.0

Multiplies a number by the number provided.

 

ToQuantity

Show Details
Server: v1.0

Many times you want to call Singularize and Pluralize to prefix a word with a number; e.g. "2 requests", "3 men". ToQuantity prefixes the provided word with the number and accordingly pluralizes or singularizes the word.

 

ToString

Show Details
Server: v1.0

Converts a number to a string.