Angular Common - Utils - localization
formatDate(value, format)
import { formatDate } from "devextreme/localization"
Parameters:
Return Value:
JavaScript
const dateString = DevExpress.localization.formatDate(new Date(2018, 4, 7), "longDate"); console.log(dateString); // logs "Monday, May 7, 2018" // ===== or when using modules ===== import { formatDate } from "devextreme/localization"; const dateString = formatDate(new Date(2018, 4, 7), "longDate"); console.log(dateString); // logs "Monday, May 7, 2018"
See Also
formatMessage(key, value)
import { formatMessage } from "devextreme/localization"
Parameters:
Return Value:
Refer to the following help topic for a code example: Add Strings to a Dictionary.
formatNumber(value, format)
import { formatNumber } from "devextreme/localization"
Parameters:
Return Value:
JavaScript
const numberString = DevExpress.localization.formatNumber(0.25, "percent"); console.log(numberString); // logs "25%" // ===== or when using modules ===== import { formatNumber } from "devextreme/localization"; const numberString = formatNumber(0.25, "percent"); console.log(numberString); // logs "25%"
See Also
loadMessages(messages)
import { loadMessages } from "devextreme/localization"
Parameters:
messages:
Refer to the following help topic for a code example: Add Strings to a Dictionary.
NOTE
It is necessary to reload the page each time you load new messages.
locale(locale)
import { locale } from "devextreme/localization"
Parameters:
locale:
NOTE
This method should be called only once - at the application's launch. It is necessary to reload the page each time you need to set new locale.
See Also
parseDate(text, format)
import { parseDate } from "devextreme/localization"
Parameters:
Return Value:
Refer to the following help topic for a code example: Format Custom Values.
parseNumber(text, format)
import { parseNumber } from "devextreme/localization"
Parameters:
Return Value:
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.