From e27eb544a49f2efdc8237f8ff28a30fceeb8e103 Mon Sep 17 00:00:00 2001 From: limabiao Date: Fri, 6 Jun 2025 17:19:42 +0800 Subject: [PATCH] =?UTF-8?q?datetime=20arkTs1.2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: limabiao Change-Id: I6f34e6202206a363bb58221e6c95c50467b54a9f --- api/@ohos.fileshare.d.ts | 6 +-- api/@ohos.systemDateTime.d.ets | 69 ---------------------------------- api/@ohos.systemDateTime.d.ts | 15 +++++--- 3 files changed, 12 insertions(+), 78 deletions(-) delete mode 100644 api/@ohos.systemDateTime.d.ets diff --git a/api/@ohos.fileshare.d.ts b/api/@ohos.fileshare.d.ts index fd9efdd225..177a4f3e1c 100644 --- a/api/@ohos.fileshare.d.ts +++ b/api/@ohos.fileshare.d.ts @@ -314,8 +314,7 @@ declare namespace fileShare { * @throws { BusinessError } 13900001 - Operation not permitted. * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.AppFileService.FolderAuthorization - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ function activatePermission(policies: Array): Promise; @@ -332,8 +331,7 @@ declare namespace fileShare { * @throws { BusinessError } 13900001 - Operation not permitted. * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.AppFileService.FolderAuthorization - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ function deactivatePermission(policies: Array): Promise; diff --git a/api/@ohos.systemDateTime.d.ets b/api/@ohos.systemDateTime.d.ets deleted file mode 100644 index ab9d59288e..0000000000 --- a/api/@ohos.systemDateTime.d.ets +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit BasicServicesKit - */ - -import { AsyncCallback } from './@ohos.base'; - -/** - * System time and timezone. - * - * @namespace systemDateTime - * @syscap SystemCapability.MiscServices.Time - * @since 20 - */ -declare namespace systemDateTime { - /** - * Obtains the number of timestamp that have elapsed since the Unix epoch. - * - * @param { boolean } [ isNanoseconds ] - True if the result is in nanoseconds, otherwise in milliseconds - * @returns { number } The timestamp returned of getTime. - * @syscap SystemCapability.MiscServices.Time - * @since 20 - */ - function getTime(isNanoseconds?: boolean): number; - - /** - * Obtains the system time zone. - * - * @param { AsyncCallback } callback - The callback of getTimezone - * @syscap SystemCapability.MiscServices.Time - * @since 20 - */ - function getTimezone(callback: AsyncCallback): void; - - /** - * Obtains the system time zone. - * - * @returns { Promise } The promise returned by the function - * @syscap SystemCapability.MiscServices.Time - * @since 20 - */ - function getTimezone(): Promise; - - /** - * Obtains the system time zone. - * - * @returns { string } The timezone returned of getTimezoneSync. - * @syscap SystemCapability.MiscServices.Time - * @since 20 - */ - function getTimezoneSync(): string; -} - -export default systemDateTime; \ No newline at end of file diff --git a/api/@ohos.systemDateTime.d.ts b/api/@ohos.systemDateTime.d.ts index bc106dd6d3..330da468cb 100644 --- a/api/@ohos.systemDateTime.d.ts +++ b/api/@ohos.systemDateTime.d.ts @@ -33,7 +33,8 @@ import { AsyncCallback } from './@ohos.base'; * @namespace systemDateTime * @syscap SystemCapability.MiscServices.Time * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace systemDateTime { /** @@ -115,7 +116,8 @@ declare namespace systemDateTime { * @returns { number } The timestamp returned of getTime. * @syscap SystemCapability.MiscServices.Time * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTime(isNanoseconds?: boolean): number; @@ -381,7 +383,8 @@ declare namespace systemDateTime { * @param { AsyncCallback } callback - The callback of getTimezone * @syscap SystemCapability.MiscServices.Time * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTimezone(callback: AsyncCallback): void; @@ -406,7 +409,8 @@ declare namespace systemDateTime { * @returns { Promise } The promise returned by the function * @syscap SystemCapability.MiscServices.Time * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTimezone(): Promise; @@ -423,7 +427,8 @@ declare namespace systemDateTime { * @returns { string } The timezone returned of getTimezoneSync. * @syscap SystemCapability.MiscServices.Time * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTimezoneSync(): string; -- Gitee