padati
v0.1.1
Published
Parses Date & Time into an Object
Downloads
4
Maintainers
Readme
Padati
A Useful Date and Time Parser!
Example
index.js
:
const Padati = require("Padati")
console.log(Padati().Day) //=> Whatever current day it is
Rules
- You must use Padati (or whatever you named the import) as a function, like this:
Padati()
NOT like this:
Padati
- 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
Padati().Day
- Returns the current dayPadati().Month
- Returns the current monthPadati().Year
- Returns the current yearPadati().Hour
- Returns the current hourPadati().Minute
- Returns the current minutePadati().Second
- Returns the current secondPadati().Milliseconds
- Returns the current millisecondPadati().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