Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: date time formats from locales #4029

Merged
merged 21 commits into from
Oct 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add: this arg for date time format callback
  • Loading branch information
YUCLing committed Oct 3, 2024
commit f89ab96aad507b071f956f19c831644eaabbcbdd
2 changes: 1 addition & 1 deletion framework/core/js/src/common/Translator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default class Translator {
const format = id && (this.translations[id] ?? id);
const formatCallback = id && this.dateTimeFormats.has(id) && this.dateTimeFormats.get(id);
if (formatCallback) {
const result = formatCallback(format);
const result = formatCallback.apply(this, [format]);
if (result) return result;
}
return time.format(format);
Expand Down
Loading