Giter Club home page Giter Club logo

vue-dashboard-clock's Introduction

A Vue component that display the current time

This package provides a simple Vue component that renders the current date and time of a given timezone.

This package is meant to be used for the Aheenam Dashboard but you can use this package for your project as well.

Installation

Simply add this package using npm/yarn

# using yarn
yarn add aheenam-dashboard-clock

# using npm
npm i -S aheenam-dashboard-clock

Usage

This package includes one component Clock. You can import it in your application and the add it to the list of components. Now you can use it in your template.

<template>
  <div>
    <clock />
  </div>
</template>

<script>
import { Clock } from 'aheenam-dashboard-clock'

export default {
  // ...
  components: {
    Clock
  }
  // ...
}
</script>

Timezone

By default the component uses Europe/Berlin as its timezone. You can change this by providing a timezone prop.

<clock timezone="AMERICA/LOS_ANGELES" />

Format Output of Date and Time

You can modify the output of the time and the date by providing the props dateFormat and timeFormat

By default dateFormat is ddd MM/DD and timeFormat defaults to HH:mm:ss

<clock timeFormat="HH:mm" dateFormat="DD.MM.YYYY" />

As this packages uses moment.js for handling time and dates, refer to its documentation for more details on format values.

Changelog

Check CHANGELOG for the changelog

Testing

To run tests use

yarn test

Contributing

soon

Security

If you discover any security related issues, please email [email protected] or use the issue tracker of GitHub.

About Aheenam

Aheenam is a small company from NRW, Germany creating custom digital solutions. Visit our website to find out more about us.

License

The MIT License (MIT). Please see License File for more information.

vue-dashboard-clock's People

Contributors

rathesdot avatar

Stargazers

Jeric Guillermo avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

jgui1129

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.