Skip to content

Noxlobin/vue-timestamp-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vue-timestamp-loader

vue-timestamp-loader is a easier way to seek the date in your vue app. It requires less lines than actual Date() and is Vue 3 friendly.

Install

npm install vue-timestamp-loader

Add the following onto the main.js file:

// imports...
import TimestampLoader from "vue-timestamp-loader";

// ...
// add the line below
app.use(TimestampLoader);

app.mount("#app");

Use

It prints the milliseconds from Date().now on the console from the start. You can get access to 5 directives to add into your Vue app (v-current-year, v-current-month, v-current-day, v-current-hour, v-current-minute).

So for example, if you want the current day, you'd write:

It is the <span v-current-day></span> of this month.

License

This project uses the apache 2.0 license.

About

An easier way to seek the date in your vue app.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published