# @xmpp/time

> XMPP Date and Time Profiles for JavaScript

Latest version **0.14.0** (published 2025-10-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install @xmpp/time
pnpm add @xmpp/time
yarn add @xmpp/time
bun add @xmpp/time
```

## Health

**Score 58/100 (C)** — status: stable.

Positive: has types package; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.14.0 |
| Published | 2025-10-29 |
| First published | 2016-11-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | separate (@types/xmpp__time) |
| Module format | ESM + CommonJS |
| Node | >= 20.10 |
| Dependencies | 0 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2275 |
| Maintainers | sonny |
| Keywords | XMPP, time, date |

## Links

- npm: https://www.npmjs.com/package/@xmpp/time
- Repository: https://github.com/xmppjs/xmpp.js
- Homepage: https://github.com/xmppjs/xmpp.js/tree/main/packages/time
- Issues: http://github.com/xmppjs/xmpp.js/issues
- npm.io page: https://npm.io/package/@xmpp/time

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 0.14.0 (latest) — 2025-10-29
- 0.13.2 — 2024-12-23
- 0.13.1 — 2022-02-13
- 0.13.0 — 2021-08-28
- 0.12.1 — 2021-08-22
- 0.12.0 — 2020-12-21
- 0.11.0 — 2020-02-14
- 0.10.0 — 2020-02-07
- 0.9.0 — 2019-11-19
- 0.8.0 — 2019-10-06
- 0.7.0 — 2019-02-03
- 0.6.0 — 2018-11-24
- 0.5.0 — 2018-10-07
- 0.3.0 — 2017-09-13
- 0.2.0 — 2017-07-02
- … 2 more at https://npm.io/package/@xmpp/time/versions

## README

# time

XMPP [Date and Time Profiles](https://xmpp.org/extensions/xep-0082.html) for JavaScript

## Install

`npm install @xmpp/time`

## Usage

```javascript
import * as time from "@xmpp/time";

time.date(); // '2016-11-18'
time.time(); // '20:45:30.221Z'
time.datetime(); // '2016-11-18T20:45:53.513Z'
time.offset(); // '-1:00'

// each method accepts an optional date or string argument

time.datetime("05 October 2011 14:48 UTC"); // '2011-10-05T14:48:00.000Z'
time.datetime(new Date("05 October 2011 14:48 UTC")); // '2011-10-05T14:48:00.000Z'
```

## References

- [XEP-0082: XMPP Date and Time Profiles](https://xmpp.org/extensions/xep-0082.html)
- [XEP-0202: Entity Time](https://xmpp.org/extensions/xep-0202.html)
- [XEP-0203: Delayed Delivery](https://xmpp.org/extensions/xep-0203.html)

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