# @types/moment-hijri

> TypeScript definitions for moment-hijri

Latest version **2.1.4** (published 2024-01-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/moment-hijri
pnpm add @types/moment-hijri
yarn add @types/moment-hijri
bun add @types/moment-hijri
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.1.4 |
| Published | 2024-01-26 |
| First published | 2019-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51378 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/moment-hijri
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/moment-hijri
- npm.io page: https://npm.io/package/@types/moment-hijri

## Dependencies (1)

- [moment](https://npm.io/package/moment.md) >=2.14.0

## Recent versions

- 2.1.4 (latest) — 2024-01-26
- 2.1.3 (ts4.5) — 2023-11-07
- 2.1.0 (ts2.0) — 2019-06-28
- 2.1.2 — 2023-10-18
- 2.1.1 — 2023-09-27

## README

# Installation
> `npm install --save @types/moment-hijri`

# Summary
This package contains type definitions for moment-hijri (https://github.com/xsoh/moment-hijri).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/moment-hijri.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/moment-hijri/index.d.ts)
````ts
import moment = require("moment");

export = moment;

declare module "moment" {
    type IUnitOfTime = "iYear" | "iMonth" | "iDate";

    function iDaysInMonth(year: number, month: number): number;

    namespace iConvert {
        interface GregorianResult {
            gy: number;
            gm: number;
            gd: number;
        }

        interface HijriResult {
            hy: number;
            hm: number;
            hd: number;
        }

        function toHijri(gy: number, gm: number, gd: number): HijriResult;
        function toGregorian(hy: number, hm: number, hd: number): GregorianResult;
    }

    interface Moment {
        startOf(unit: IUnitOfTime): Moment;
        endOf(unit: IUnitOfTime): Moment;

        add(amount: string | number, unit: IUnitOfTime): Moment;
        subtract(amount: string | number, unit: IUnitOfTime): Moment;

        iYear(y: number): Moment;
        iYear(): number;
        iMonth(m: number | string): Moment;
        iMonth(): number;
        iDate(d: number): Moment;
        iDate(): number;
        iWeek(d: number): Moment;
        iWeek(): number;
        iWeekYear(d: number): Moment;
        iWeekYear(): number;
        iDayOfYear(d: number): Moment;
        iDayOfYear(): number;
        iDaysInMonth(): number;
    }
}

````

### Additional Details
 * Last updated: Fri, 26 Jan 2024 06:07:46 GMT
 * Dependencies: [moment](https://npmjs.com/package/moment)

# Credits
These definitions were written by [Alaa Masoud](https://github.com/alaatm).

---
_Source: https://npm.io/package/@types/moment-hijri · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
