UNPKG

warscript

Version:

A typescript library for Warcraft III using Warpack.

98 lines (97 loc) 3.54 kB
/** @noSelfInFile */ import { BinaryReader } from "../binaryreader"; import { BinaryWriter } from "../binarywriter"; /** * A day-of-week, such as 'Tuesday'. * <p> * {@code DayOfWeek} is a class representing the 7 days of the week - * Monday, Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday. * <p> * This class represents a common concept that is found in many calendar systems. * As such, this class may be used by any calendar system that has the day-of-week * concept defined exactly equivalent to the ISO calendar system. */ export declare class DayOfWeek { readonly value: number; /** * The singleton instance for the day-of-week of Monday. * This has the numeric value of {@code 1}. */ static readonly MONDAY: DayOfWeek; /** * The singleton instance for the day-of-week of Tuesday. * This has the numeric value of {@code 2}. */ static readonly TUESDAY: DayOfWeek; /** * The singleton instance for the day-of-week of Wednesday. * This has the numeric value of {@code 3}. */ static readonly WEDNESDAY: DayOfWeek; /** * The singleton instance for the day-of-week of Thursday. * This has the numeric value of {@code 4}. */ static readonly THURSDAY: DayOfWeek; /** * The singleton instance for the day-of-week of Friday. * This has the numeric value of {@code 5}. */ static readonly FRIDAY: DayOfWeek; /** * The singleton instance for the day-of-week of Saturday. * This has the numeric value of {@code 6}. */ static readonly SATURDAY: DayOfWeek; /** * The singleton instance for the day-of-week of Sunday. * This has the numeric value of {@code 7}. */ static readonly SUNDAY: DayOfWeek; private constructor(); /** * Obtains an instance of {@code DayOfWeek} from an {@code int} value. * <p> * {@code DayOfWeek} is a class representing the 7 days of the week. * This factory allows the class to be obtained from the {@code int} value. * The {@code int} value follows the ISO-8601 standard, from 1 (Monday) to 7 (Sunday). * * @param dayOfWeek the day-of-week to represent, from 1 (Monday) to 7 (Sunday) * @return the day-of-week singleton */ static of(dayOfWeek: number): DayOfWeek; static deserialize(reader: BinaryReader): DayOfWeek; serialize(writer: BinaryWriter): void; /** * Returns the day-of-week that is the specified number of days after this one. * <p> * The calculation rolls around the end of the week from Sunday to Monday. * The specified period may be negative. * <p> * This instance is immutable and unaffected by this method call. * * @param days the days to add, positive or negative * @return the resulting day-of-week */ plus(days: number): DayOfWeek; /** * Returns the day-of-week that is the specified number of days before this one. * <p> * The calculation rolls around the start of the year from Monday to Sunday. * The specified period may be negative. * <p> * This instance is immutable and unaffected by this method call. * * @param days the days to subtract, positive or negative * @return the resulting day-of-week */ minus(days: number): DayOfWeek; /** * Outputs this day-of-week as a {@code string}. * * @return a string representation of this day-of-week */ toString(): string; private __lt; private __le; }