# joi-dateonly

> A dateonly validatof for joi

Latest version **1.0.1** (published 2018-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install joi-dateonly
pnpm add joi-dateonly
yarn add joi-dateonly
bun add joi-dateonly
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-06-27 |
| First published | 2018-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Krzysztof Walo |
| Maintainers | kwalo |
| Keywords | joi, date, timezone, extension, validation |

## Links

- npm: https://www.npmjs.com/package/joi-dateonly
- npm.io page: https://npm.io/package/joi-dateonly

## Dependencies (2)

- [joi](https://npm.io/package/joi.md) ^13.4.0
- [dateonly](https://npm.io/package/dateonly.md) ^1.2.0

## 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

- 1.0.1 (latest) — 2018-06-27
- 1.0.0 — 2018-06-26

## README

# joi-dateonly
A Joi extension to for validating [DateOnly](https://www.npmjs.com/package/dateonly) class.

## Installation

```
npm install joi-dateonly
```

## Usage
Use extended joi object for validation
```js
const joiDateonly = require('joi-dateonly');
let joi = require('joi');
joi = joiDateonly(joi);

let result = joi.validate('2018-06-20', joi.dateonly());
console.log(result.value); // => 20180520

// Other joi types work as well
joi.validate({number: 1, date: 20180520}, {number: joi.number(), date: joi.dateonly().required()});
```

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