Types
Types
BBj masks factory
Static Method Summary
| Static Public Methods | ||
| public static |
Mask a date according to bbj masking rules |
|
| public static |
number(number: Number, mask: String, groupingSeparator: String, decimalSeparator: String, forceTrailingZeros: Boolean, loose: Boolean, ignoreFillChar: Boolean, trimSpaces: Boolean, floatSpecialChars: Boolean): String Mask the given number with the given mask according to BBj rules |
|
| public static |
Mask the given string with the given mask according to BBj rules |
|
Static Public Methods
public static date(date: String, mask: String, locale: String, timezone: String): String source
Mask a date according to bbj masking rules
Params:
| Name | Type | Attribute | Description |
| date | String | date as a string |
|
| mask | String | mask as a string |
|
| locale | String |
|
the language to use ex(en-US). default is to the system language |
| timezone | String |
|
the time zone descriptor (e.g. America/Los_Angeles). default to the system timezone |
public static number(number: Number, mask: String, groupingSeparator: String, decimalSeparator: String, forceTrailingZeros: Boolean, loose: Boolean, ignoreFillChar: Boolean, trimSpaces: Boolean, floatSpecialChars: Boolean): String source
Mask the given number with the given mask according to BBj rules
Params:
| Name | Type | Attribute | Description |
| number | Number | the number to format |
|
| mask | String | the mask to use for formatting |
|
| groupingSeparator | String |
|
a char which will be used as a grouping separator |
| decimalSeparator | String |
|
a char which will be used as a decimal separator |
| forceTrailingZeros | Boolean |
|
Affects the output by switching the way a mask with "#" characters in the trailing positions is filled.
for example, the function |
| loose | Boolean |
|
when true , errors will be ignored and the method will try at apply the mask anyway , otherwise it will stop at first error and throw it. |
| ignoreFillChar | Boolean |
|
when true , then the fill char will always be an empty space
event if the mask start with a |
| trimSpaces | Boolean |
|
When true , the final masked value will not contain any spaces |
| floatSpecialChars | Boolean |
|
When true , then if any of "-", "+", "$", and "(". characters is present in the mask, the first one encountered will be moved to the last position where a "#" or "," was replaced by the fill character. If no such position exists, the float character is left where it |
Throw:
MaskError |
only if loose is disabled |
