diff --git a/frontend/packages/studio/open-platform/open-auth/src/utils/time.ts b/frontend/packages/studio/open-platform/open-auth/src/utils/time.ts index 2c112851..e7661296 100644 --- a/frontend/packages/studio/open-platform/open-auth/src/utils/time.ts +++ b/frontend/packages/studio/open-platform/open-auth/src/utils/time.ts @@ -13,21 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + import dayjs from 'dayjs'; import { I18n, type I18nKeysNoOptionsType } from '@coze-arch/i18n'; -const MAX_EXPIRATION_DAYS = 30; -// 1-30 days valid period export const disabledDate = (date?: Date) => { const today = dayjs().startOf('day'); // Start time of the day - const thirtyDaysLater = today.add(MAX_EXPIRATION_DAYS, 'day'); // Date in 30 days - return ( - dayjs(date).isBefore(today, 'day') || - dayjs(date).isSame(today, 'day') || - dayjs(date).isAfter(thirtyDaysLater, 'day') - ); + return dayjs(date).isBefore(today, 'day') || dayjs(date).isSame(today, 'day'); }; export enum ExpirationDate {