How to use the lightning/configProvider.getLocalizationService function in lightning

To help you get started, we’ve selected a few lightning examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github salesforce / base-components-recipes / force-app / main / default / lwc / internationalizationLibrary / localizationService.js View on Github external
export function syncWallTimeToUTC(date, timeZone) {
    let converted = null;

    // eslint-disable-next-line new-cap
    getLocalizationService().WallTimeToUTC(date, timeZone, result => {
        converted = result;
    });
    return converted;
}
github salesforce / base-components-recipes / force-app / main / default / lwc / internationalizationLibrary / localizationService.js View on Github external
export function duration(value, unit) {
    return getLocalizationService().duration(value, unit);
}
github salesforce / base-components-recipes / force-app / main / default / lwc / internationalizationLibrary / localizationService.js View on Github external
export function getNumberFormat(format) {
    return getLocalizationService().getNumberFormat(format);
}
github salesforce / base-components-recipes / force-app / main / default / lwc / internationalizationLibrary / localizationService.js View on Github external
export function formatTime(timeString, format) {
    return getLocalizationService().formatTime(timeString, format);
}
github salesforce / base-components-recipes / force-app / main / default / lwc / internationalizationLibrary / localizationService.js View on Github external
export function parseDateTimeISO8601(dateTimeString) {
    return getLocalizationService().parseDateTimeISO8601(dateTimeString);
}
github salesforce / base-components-recipes / force-app / main / default / lwc / internationalizationLibrary / localizationService.js View on Github external
export function parseDateTime(dateTimeString, format, strictMode) {
    return getLocalizationService().parseDateTime(
        dateTimeString,
        format,
        strictMode
    );
}
github salesforce / base-components-recipes / force-app / main / default / lwc / internationalizationLibrary / localizationService.js View on Github external
export function toOtherCalendar(date) {
    return getLocalizationService().translateToOtherCalendar(date);
}
github salesforce / base-components-recipes / force-app / main / default / lwc / internationalizationLibrary / localizationService.js View on Github external
export function formatDateUTC(dateString, format, locale) {
    return getLocalizationService().formatDateUTC(dateString, format, locale);
}
github salesforce / base-components-recipes / force-app / main / default / lwc / internationalizationLibrary / localizationService.js View on Github external
export function fromLocalizedDigits(input) {
    return getLocalizationService().translateFromLocalizedDigits(input);
}
github salesforce / base-components-recipes / force-app / main / default / lwc / internationalizationLibrary / localizationService.js View on Github external
export function toLocalizedDigits(input) {
    return getLocalizationService().translateToLocalizedDigits(input);
}