Release 1.297.4 (#2209)
This commit is contained in:
@@ -234,6 +234,16 @@ export function isCurrency(aSymbol = '') {
|
||||
return currencies[aSymbol];
|
||||
}
|
||||
|
||||
export function interpolate(template: string, context: any) {
|
||||
return template.replace(/[$]{([^}]+)}/g, (_, objectPath) => {
|
||||
const properties = objectPath.split('.');
|
||||
return properties.reduce(
|
||||
(previous, current) => previous?.[current],
|
||||
context
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export function resetHours(aDate: Date) {
|
||||
const year = getYear(aDate);
|
||||
const month = getMonth(aDate);
|
||||
|
Reference in New Issue
Block a user