<commit_before>// Type definitions for Moment.js 2.8.0
// Project: https://github.com/timrwood/moment
// Definitions by: <NAME> <https://github.com/Lakerfield>, <NAME> <https://github.com/kingdango>, <NAME> <https://github.com/horiuchi>, <NAME> <https://github.com/DickvdBrink>, <NAME> <https://github.com/adidahiya>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

interface MomentInput {

    years?: number;
    y?: number;

    months?: number;
    M?: number;

    weeks?: number;
    w?: number;

    days?: number;
    d?: number;

    hours?: number;
    h?: number;

    minutes?: number;
    m?: number;

    seconds?: number;
    s?: number;

    milliseconds?: number;
    ms?: number;

}

interface Duration {

    humanize(withSuffix?: boolean): string;

    as(units: string): number;

    milliseconds(): number;
    asMilliseconds(): number;

    seconds(): number;
    asSeconds(): number;

    minutes(): number;
    asMinutes(): number;

    hours(): number;
    asHours(): number;

    days(): number;
    asDays(): number;

    months(): number;
    asMonths(): number;

    years(): number;
    asYears(): number;

    add(n: number, p: string): Duration;
    add(n: number): Duration;
    add(d: Duration): Duration;

    subtract(n: number, p: string): Duration;
    subtract(n: number): Duration;
    subtract(d: Duration): Duration;

    toISOString(): string;

}

interface Moment {

    format(format: string): string;
    format(): string;

    fromNow(withoutSuffix?: boolean): string;

    startOf(unitOfTime: string): Moment;
    endOf(unitOfTime: string): Moment;

    /**
     * Mutates the original moment by adding time. (deprecated in 2.8.0)
     *
     * @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc)
     * @param amount the amount you want to add
     */
    add(unitOfTime: string, amount: number): Moment;
    /**
     * Mutates the original moment by adding time.
     *
     * @param amount the amount you want to add
     * @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc)
     */
    add(amount: number, unitOfTime: string): Moment;
    /**
     * Mutates the original moment by adding time. Note that the order of arguments can be flipped.
     *
     * @param amount the amount you want to add
     * @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc)
     */
    add(amount: string, unitOfTime: string): Moment;
    /**
     * Mutates the original moment by adding time.
     *
     * @param objectLiteral an object literal that describes multiple time units {days:7,months:1}
     */
    add(objectLiteral: MomentInput): Moment;
    /**
     * Mutates the original moment by adding time.
     *
     * @param duration a length of time
     */
    add(duration: Duration): Moment;

    /**
     * Mutates the original moment by subtracting time. (deprecated in 2.8.0)
     *
     * @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc)
     * @param amount the amount you want to subtract
     */
    subtract(unitOfTime: string, amount: number): Moment;
    /**
     * Mutates the original moment by subtracting time.
     *
     * @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc)
     * @param amount the amount you want to subtract
     */
    subtract(amount: number, unitOfTime: string): Moment;
    /**
     * Mutates the original moment by subtracting time. Note that the order of arguments can be flipped.
     *
     * @param amount the amount you want to add
     * @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc)
     */
    subtract(amount: string, unitOfTime: string): Moment;
    /**
     * Mutates the original moment by subtracting time.
     *
     * @param objectLiteral an object literal that describes multiple time units {days:7,months:1}
     */
    subtract(objectLiteral: MomentInput): Moment;
    /**
     * Mutates the original moment by subtracting time.
     *
     * @param duration a length of time
     */
    subtract(duration: Duration): Moment;

    calendar(): string;
    calendar(start: Moment): string;

    clone(): Moment;

    /**
     * @return Unix timestamp, or milliseconds since the epoch.
     */
    valueOf(): number;

    local(): Moment; // current date/time in local mode

    utc(): Moment; // current date/time in UTC mode

    isValid(): boolean;

    year(y: number): Moment;
    year(): number;
    quarter(): number;
    quarter(q: number): Moment;
    month(M: number): Moment;
    month(M: string): Moment;
    month(): number;
    day(d: number): Moment;
    day(d: string): Moment;
    day(): number;
    date(d: number): Moment;
    date(): number;
    hours(h: number): Moment;
    hours(): number;
    minutes(m: number): Moment;
    minutes(): number;
    seconds(s: number): Moment;
    seconds(): number;
    milliseconds(ms: number): Moment;
    milliseconds(): number;
    weekday(): number;
    weekday(d: number): Moment;
    isoWeekday(): number;
    isoWeekday(d: number): Moment;
    weekYear(): number;
    weekYear(d: number): Moment;
    isoWeekYear(): number;
    isoWeekYear(d: number): Moment;
    week(): number;
    week(d: number): Moment;
    weeks(): number;
    weeks(d: number): Moment;
    isoWeek(): number;
    isoWeek(d: number): Moment;
    isoWeeks(): number;
    isoWeeks(d: number): Moment;
    weeksInYear(): number;
    isoWeeksInYear(): number;

    from(f: Moment): string;
    from(f: Moment, suffix: boolean): string;
    from(d: Date): string;
    from(s: string): string;
    from(date: number[]): string;

    diff(b: Moment): number;
    diff(b: Moment, unitOfTime: string): number;
    diff(b: Moment, unitOfTime: string, round: boolean): number;<commit_msg>added singular methods for Moment<commit_after>// Type definitions for Moment.js 2.8.0
// Project: https://github.com/timrwood/moment
// Definitions by: <NAME> <https://github.com/Lakerfield>, <NAME> <https://github.com/kingdango>, <NAME> <https://github.com/horiuchi>, <NAME> <https://github.com/DickvdBrink>, <NAME> <https://github.com/adidahiya>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

interface MomentInput {

    years?: number;
    y?: number;

    months?: number;
    M?: number;

    weeks?: number;
    w?: number;

    days?: number;
    d?: number;

    hours?: number;
    h?: number;

    minutes?: number;
    m?: number;

    seconds?: number;
    s?: number;

    milliseconds?: number;
    ms?: number;

}

interface Duration {

    humanize(withSuffix?: boolean): string;

    as(units: string): number;

    milliseconds(): number;
    asMilliseconds(): number;

    seconds(): number;
    asSeconds(): number;

    minutes(): number;
    asMinutes(): number;

    hours(): number;
    asHours(): number;

    days(): number;
    asDays(): number;

    months(): number;
    asMonths(): number;

    years(): number;
    asYears(): number;

    add(n: number, p: string): Duration;
    add(n: number): Duration;
    add(d: Duration): Duration;

    subtract(n: number, p: string): Duration;
    subtract(n: number): Duration;
    subtract(d: Duration): Duration;

    toISOString(): string;

}

interface Moment {

    format(format: string): string;
    format(): string;

    fromNow(withoutSuffix?: boolean): string;

    startOf(unitOfTime: string): Moment;
    endOf(unitOfTime: string): Moment;

    /**
     * Mutates the original moment by adding time. (deprecated in 2.8.0)
     *
     * @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc)
     * @param amount the amount you want to add
     */
    add(unitOfTime: string, amount: number): Moment;
    /**
     * Mutates the original moment by adding time.
     *
     * @param amount the amount you want to add
     * @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc)
     */
    add(amount: number, unitOfTime: string): Moment;
    /**
     * Mutates the original moment by adding time. Note that the order of arguments can be flipped.
     *
     * @param amount the amount you want to add
     * @param unitOfTime the unit of time you want to add (eg "years" / "hours" etc)
     */
    add(amount: string, unitOfTime: string): Moment;
    /**
     * Mutates the original moment by adding time.
     *
     * @param objectLiteral an object literal that describes multiple time units {days:7,months:1}
     */
    add(objectLiteral: MomentInput): Moment;
    /**
     * Mutates the original moment by adding time.
     *
     * @param duration a length of time
     */
    add(duration: Duration): Moment;

    /**
     * Mutates the original moment by subtracting time. (deprecated in 2.8.0)
     *
     * @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc)
     * @param amount the amount you want to subtract
     */
    subtract(unitOfTime: string, amount: number): Moment;
    /**
     * Mutates the original moment by subtracting time.
     *
     * @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc)
     * @param amount the amount you want to subtract
     */
    subtract(amount: number, unitOfTime: string): Moment;
    /**
     * Mutates the original moment by subtracting time. Note that the order of arguments can be flipped.
     *
     * @param amount the amount you want to add
     * @param unitOfTime the unit of time you want to subtract (eg "years" / "hours" etc)
     */
    subtract(amount: string, unitOfTime: string): Moment;
    /**
     * Mutates the original moment by subtracting time.
     *
     * @param objectLiteral an object literal that describes multiple time units {days:7,months:1}
     */
    subtract(objectLiteral: MomentInput): Moment;
    /**
     * Mutates the original moment by subtracting time.
     *
     * @param duration a length of time
     */
    subtract(duration: Duration): Moment;

    calendar(): string;
    calendar(start: Moment): string;

    clone(): Moment;

    /**
     * @return Unix timestamp, or milliseconds since the epoch.
     */
    valueOf(): number;

    local(): Moment; // current date/time in local mode

    utc(): Moment; // current date/time in UTC mode

    isValid(): boolean;

    year(y: number): Moment;
    year(): number;
    quarter(): number;
    quarter(q: number): Moment;
    month(M: number): Moment;
    month(M: string): Moment;
    month(): number;
    day(d: number): Moment;
    day(d: string): Moment;
    day(): number;
    date(d: number): Moment;
    date(): number;
    hour(h: number): Moment;
    hour(): number;
    hours(h: number): Moment;
    hours(): number;
    minute(m: number): Moment;
    minute(): number;
    minutes(m: number): Moment;
    minutes(): number;
    second(s: number): Moment;
    second(): number;
    seconds(s: number): Moment;
    seconds(): number;
    millisecond(ms: number): Moment;
    millisecond(): number;
    milliseconds(ms: number): Moment;
    milliseconds(): number;
    weekday(): number;
    weekday(d: number): Moment;
    isoWeekday(): number;
    isoWeekday(d: number): Moment;
    weekYear(): number;
    weekYear(d: number): Moment;
    isoWeekYear(): number;
    isoWeekYear(d: number): Moment;
    week(): number;
    week(d: number): Moment;
    weeks(): number;
    weeks(d: number): Moment;
    isoWeek(): number;
    isoWeek(d: number): Moment;
    isoWeeks(): number;
    isoWeeks(d: number): Moment;
    weeksInYear(): number;
    isoWeeksInYear(): number;

    from(f: Moment): string;
    from(f: Moment, suffix: boolean): string;
    from(d: Date): string;
    from(s: string): string;
    from(date: number[]): string;

    diff(b: Moment): number;
    diff(b: Moment, unitOfTime: string): number;
    diff(b: Moment, unitOfTime: string, round: boolean): number;
{'fraction_non_alphanumeric': 0.13141268637856962, 'fraction_numerical': 0.002190211439642827, 'mean_word_length': 2.8557973367976617, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1633192', 'n_tokens_mistral': 3786, 'n_tokens_neox': 3505, 'n_words': 1211}