Numeric Filters

You are here:

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.

 

Ceiling

Show Details
v4.0

Takes a number and returns the next largest integer.

 

DividedBy

Show Details
v1.0

Divides a number by the number provided.

 

Floor

Show Details
v4.0

Takes a number and returns the next smallest integer.

 

Format

Show Details
v4.0

Formats the number based on a pattern your provide.

 

FormatAsCurrency

Show Details
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
v1.0

Subtracts a number from the number provided.

 

Modulo

Show Details
v1.0

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

 

NumberToOrdinal

Show Details
v1.0

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

 

NumberToOrdinalWords

Show Details
v1.0

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

 

NumberToRomanNumerals

Show Details
v1.0

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

 

NumberToWords

Show Details
v1.0

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

 

Plus

Show Details
v1.0

Adds a number to the number provided.

 

Times

Show Details
v1.0

Multiplies a number by the number provided.

 

ToQuantity

Show Details
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
v1.0

Converts a number to a string.