/*! ***************************************************************************** Copyright (c) JDJR Corporation. All rights reserved. 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 Author: kemao 2018-12-04 12:17:58 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ import { ILarkDate, WEEK } from "./LarkDateDto"; export declare class LarkDate { static getVisualTimeoutByDate(startDate: Date, endDate: Date): string; /** * 获得当前经过了多长的时间 * @param timestamp 毫秒数 */ static getVisualTimeout(timestamp: number): string; /** * 获得一个utc时间对象 * @param date 待转化的时间 */ static getUTCDate(date: Date): Date; /** * 获得星期 * @param date 时间 */ static getWeekStringByDate(date: Date): "星期天" | "星期一" | "星期二" | "星期三" | "星期四" | "星期五" | "星期六"; static getWeekString(week: WEEK): "星期天" | "星期一" | "星期二" | "星期三" | "星期四" | "星期五" | "星期六"; /** * 实例化一个时间对象,传什么得什么 * @param date 时间 */ static getDate(date: ILarkDate): Date; /** * 时间格式化 * @param Date date * @param format "yyyy-MM-dd hh:mm:ss.uuu" * @return string date */ static format(date: Date, format?: string): string; /** * @param Date date * @return string "yyyy-MM-dd hh:mm:ss.uuu" * @deprecated 过时了,直接使用format */ static getDateTimeString(date: Date): string; /** * 获得字符串的时间,不带任何符号。数字类型 * @param Date date * @return number "yyyyMMddhhmmssuuu" */ static getDateTimeStringNumber(date: Date): number; static getDateString(date: any): string; static getDateStringNumber(date: any): number; /** * 代码延迟执行 * @param timeout 延时时间 */ static delay(timeout: number): Promise; /** * 代码延迟区间执行 * @param min 最小值 * @param max 最大值 */ static delayRange(min: number, max: number, callback?: (timeout: any) => Promise): Promise; static tideInterval(): Promise; }