rusackas commented on code in PR #37923:
URL: https://github.com/apache/superset/pull/37923#discussion_r2796606852


##########
superset-frontend/packages/superset-ui-core/src/utils/dates.ts:
##########
@@ -40,8 +40,29 @@ dayjs.updateLocale('en', {
   invalidDate: 'Invalid date',
 });
 
-export const extendedDayjs = dayjs;
-export type { Dayjs };
+// Extended Dayjs instance type with plugin methods
+export interface ExtendedDayjs extends Dayjs {
+  utc(keepLocalTime?: boolean): ExtendedDayjs;
+  local(): ExtendedDayjs;
+  tz(timezone?: string, keepLocalTime?: boolean): ExtendedDayjs;
+  fromNow(withoutSuffix?: boolean): string;
+  toNow(withoutSuffix?: boolean): string;
+}
+
+// Type for dayjs factory with all plugins loaded
+type DayjsWithPlugins = {
+  (config?: ConfigType, format?: string): ExtendedDayjs;
+  utc(config?: ConfigType, format?: string): ExtendedDayjs;
+  tz: {
+    (input?: ConfigType, timezone?: string): ExtendedDayjs;

Review Comment:
   Applied in 7ff3e0ad48. Added the missing methods (`isUTC`, `from`, `to`, 
`calendar`) and ensured all methods that return Dayjs instances now return 
`ExtendedDayjs` for proper chaining support.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to