0.1.1 • Published 3 years ago

padati v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Padati

A Useful Date and Time Parser!

Example

index.js:

const Padati = require("Padati")

console.log(Padati().Day) //=> Whatever current day it is

Rules

  1. You must use Padati (or whatever you named the import) as a function, like this:
Padati()

NOT like this:

Padati
  1. You must capitalize the item your getting off of the object, otherwise it won't work:
Padati().Second

NOT like this:

Padati().second

Items from the import

  1. Padati().Day - Returns the current day
  2. Padati().Month - Returns the current month
  3. Padati().Year - Returns the current year
  4. Padati().Hour - Returns the current hour
  5. Padati().Minute - Returns the current minute
  6. Padati().Second - Returns the current second
  7. Padati().Milliseconds - Returns the current millisecond
  8. Padati().Timezone - Returns the current timezone

Global Scripts

Use padati when you installed it globally or...

... Create a script, with the script body as padati.

It will return a kind-of similar object like this:

{
  Day: 9,
  Month: 4,
  Year: 2021,
  Hour: 17,
  Minute: 2,
  Second: 9,
  Milliseconds: 291,
  Timezone: 'Eastern Daylight Time'
}

But differently, of course, depending on where & what time you are in :)

License

MIT