These examples show you the strength of the locale.formatstring() viper. Specify any kind and/or number of input parameters (datetime, number, string) and a format string, and see how easy it is to format e.g. datetimes and numbers within a specific culture.
The locale.formatstring() viper uses the .NET String.Format() method, which uses the composite formatting feature, so anything you can do with this method you can do with this viper as well.
Some standard numeric format specifiers:
- C - Currency
- D - Decimal
- E - Scientific
- P - Percent
- X - Hexadecimal
Some standard datetime format specifiers:
- d - Short date
- D - Long date
- t - Short time
- T - Long time
- f - Full date/short time
- F - Full date/long time