# @ryanlsmith/date_lib

> A date library for javascript

Latest version **1.0.0** (published 2019-08-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ryanlsmith/date_lib
pnpm add @ryanlsmith/date_lib
yarn add @ryanlsmith/date_lib
bun add @ryanlsmith/date_lib
```

## 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.0 |
| Published | 2019-08-13 |
| First published | 2019-08-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ryan Smith |
| Maintainers | ryanlsmith |

## Links

- npm: https://www.npmjs.com/package/@ryanlsmith/date_lib
- npm.io page: https://npm.io/package/@ryanlsmith/date_lib

## Recent versions

- 1.0.0 (latest) — 2019-08-13

## README

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [MyDate][1]
    -   [Parameters][2]
    -   [year][3]
    -   [month][4]
    -   [day][5]
    -   [justHours][6]
    -   [justMins][7]
    -   [justSecs][8]
    -   [format][9]
        -   [Parameters][10]
        -   [Examples][11]
    -   [when][12]
        -   [Examples][13]

## MyDate

This class creates a Date obj out of an args array

### Parameters

-   `args` **...any** 
-   `input` **[Date][14]** a date in various formats

Returns **[Date][14]** an instantiation of the Date class in js as an object

### year

This method on my Date class returns the year of the date formatted as a string

Returns **[String][15]** formated year

### month

This method on my Date class returns the month of the date formatted as a string

Returns **[String][15]** formated month

### day

This method on my Date class returns the day of the date formatted as a string

Returns **[String][15]** formated day

### justHours

This method on my Date class returns the hour of the date formatted as a string

Returns **[String][15]** formated hour

### justMins

This method on my Date class returns the mins of the date formatted as a string

Returns **[String][15]** formated mins

### justSecs

This method on my Date class returns the year of the date formatted as a string

Returns **[String][15]** formated year

### format

This method on my Date class returns the year of the date formatted as a string

#### Parameters

-   `args` **...any** 

#### Examples

```javascript
MyDate.format('y/m/d') => 2017/Jan/2 && MyDate.format('H:I:S') => 03:04:05
```

Returns **[String][15]** formated Date with optional params

### when

This method on my Date class returns a description of 'when' a date will happen

#### Examples

```javascript
MyDate.when() => todays date - date of constructed date object
```

Returns **[String][15]** formated Date with the time from today to the constructed date object

[1]: #mydate

[2]: #parameters

[3]: #year

[4]: #month

[5]: #day

[6]: #justhours

[7]: #justmins

[8]: #justsecs

[9]: #format

[10]: #parameters-1

[11]: #examples

[12]: #when

[13]: #examples-1

[14]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date

[15]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

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