# get-date-based-on-weekday

> Gets the date of provided week number and weekday

Latest version **1.0.5** (published 2022-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install get-date-based-on-weekday
pnpm add get-date-based-on-weekday
yarn add get-date-based-on-weekday
bun add get-date-based-on-weekday
```

## 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.5 |
| Published | 2022-08-10 |
| First published | 2022-08-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Galo Garlejo |
| Maintainers | galoberlyn |
| Keywords | date, get-date, weekday, get-date-based-on-weekday, date getter based on weekday, week date getter, get week date |

## Links

- npm: https://www.npmjs.com/package/get-date-based-on-weekday
- Repository: https://github.com/galoberlyn/get-date-based-on-weekday
- Homepage: https://github.com/galoberlyn/get-date-based-on-weekday#readme
- Issues: https://github.com/galoberlyn/get-date-based-on-weekday/issues
- npm.io page: https://npm.io/package/get-date-based-on-weekday

## 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.5 (latest) — 2022-08-10
- 1.0.4 — 2022-08-10
- 1.0.3 — 2022-08-10
- 1.0.2 — 2022-08-10
- 1.0.1 — 2022-08-10
- 1.0.0 — 2022-08-10

## README

# get-date-based-on-weekday

An easy to use package that gets the date of the weekday and week number provided.
Does not use moment or any date libraries




## Installing

To install this library

```bash
  npm install get-date-based-on-weekday
```

```bash
  yarn install get-date-based-on-weekday
```

## API Reference


| Function | Return Type     | Description                |
| :-------- | :------- | :------------------------- |
| `getSundayOfMonth(:date, :weekNumber)` | `Date Object` | Returns the date of the Sunday |
| `getMondayOfMonth(:date, :weekNumber)` | `Date Object` | Returns the date of the Monday |
| `getTuesdayOfMonth(:date, :weekNumber)` | `Date Object` | Returns the date of the Tuesday |
| `getWednesdayOfMonth(:date, :weekNumber)` | `Date Object` | Returns the date of the Wednesday |
| `getFridayOfMonth(:date, :weekNumber)` | `Date Object` | Returns the date of the Friday |
| `getSaturdayOfMonth(:date, :weekNumber)` | `Date Object` | Returns the date of the Saturday |

#### Available parameters


| Parameter | Type     | Description                       |
| :-------- | :------- | :-------------------------------- |
| `date`      | `Date Object` | The Date object you want to base on. example: `new Date()` |
| `weekNumber` | `number` | The preferred week number from 1 to 4 |



## Usage/Examples

TypeScript 

```javascript
import { getFridayOfMonth } from "get-date-based-on-weekday/dist";

// param 1 date of what you want to base on
// param 2 the week number from 1 to 4


console.log(getFridayOfMonth(new Date('2022-08-10'), 2).toDateString())
// output Fri Aug 12 2022

console.log(getFridayOfMonth(new Date('2022-06-10'), 1).toDateString());
// Friday June 03 2022
```

Commonjs

```javascript
const DateWeekGetter = require('get-date-based-on-weekday/dist');

console.log(DateWeekGetter.getFridayOfMonth(new Date(), 2));
// output date

```


## Author

- [@galoberlyn](https://www.github.com/galoberlyn)


## License

[MIT](https://choosealicense.com/licenses/mit/)

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