/******************************************************************** * @author: Kaven * @email: kaven@wuwenkai.com * @website: http://blog.kaven.xyz * @file: [Kaven-Basic] /src/libs/class/TimeSpan.ts * @create: 2023-11-27 11:29:26.634 * @modify: 2025-07-01 13:13:47.373 * @version: 6.0.0 * @times: 23 * @lines: 189 * @copyright: Copyright © 2023-2025 Kaven. All Rights Reserved. * @description: [description] * @license: * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ********************************************************************/ import { ITimeSpan } from "../interface/ITimeSpan"; /** * Represents a duration of time and provides methods to access * individual components of the duration (milliseconds, seconds, minutes, etc.). * * @since 4.3.0 * @version 2023-11-27 */ export declare class TimeSpan { /** * Total duration in milliseconds. */ private totalMilliseconds; /** * Constructs a TimeSpan object. * @param milliseconds - The total duration in milliseconds. */ constructor(milliseconds: number); /** * Constructs a TimeSpan object from an existing ITimeSpan object. * @param span - An ITimeSpan object containing the duration. */ constructor(span: ITimeSpan); /** * Gets the remaining milliseconds after extracting whole seconds. */ get Milliseconds(): number; /** * Gets the whole seconds in the duration. */ get Seconds(): number; /** * Gets the whole minutes in the duration. */ get Minutes(): number; /** * Gets the whole hours in the duration. */ get Hours(): number; /** * Gets the whole days in the duration. */ get Days(): number; /** * Gets the whole weeks in the duration. */ get Weeks(): number; /** * Gets the TimeSpan representation of the duration, breaking down * the total duration into individual components. * @returns An ITimeSpan object representing the duration. */ get Span(): ITimeSpan; /** * Gets the total duration in milliseconds. */ get TotalMilliseconds(): number; /** * Gets the total duration in whole seconds. */ get TotalSeconds(): number; /** * Gets the total duration in whole minutes. */ get TotalMinutes(): number; /** * Gets the total duration in whole hours. */ get TotalHours(): number; /** * Gets the total duration in whole days. */ get TotalDays(): number; /** * Gets the total duration in whole weeks. */ get TotalWeeks(): number; } //# sourceMappingURL=TimeSpan.d.ts.map