A Useful Date and Time Parser!
index.js
:
const Padati = require("Padati")
console.log(Padati().Day) //=> Whatever current day it is
- 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
-
Padati().Day
- Returns the current day -
Padati().Month
- Returns the current month -
Padati().Year
- Returns the current year -
Padati().Hour
- Returns the current hour -
Padati().Minute
- Returns the current minute -
Padati().Second
- Returns the current second -
Padati().Milliseconds
- Returns the current millisecond -
Padati().Timezone
- Returns the current timezone
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 :)
MIT