GithubHelp home page GithubHelp logo

get-current-date's Introduction

Get Current Date

Description

A simple tool that displays the current date using Node.js. The basic functionalities are described below.

gcd <COMMAND> [OPTION]

Displays the date

Commands:
  gcd current  Display the current date. It will only show a certain part of the
               date, if there is at least one time-related option. Otherwise,
               the full ISO date will be displayed.
  gcd add      Add amount of time set by options to the current date. At least
               one time-related option is required.
  gcd sub      Subtract amount of time set by options from the current date. At
               least one time-related option is required.

Options:
  -y, --year     Year
  -m, --month    Month
  -d, --date     Date
      --debug    Debug (input logging)
  -h, --help     Show help                                             [boolean]
  -v, --version  Show version number                                   [boolean]

Examples:
  gcd current        Displays the current date
  gcd current -y     Displays the current year
  gcd add -m 4       Calculates the date in four months
  gcd sub -y 1 -m 4  Calculates the date that was one year and four months
                     earlier

Initialisation

NOTE: Linking/unlinking may require sudo rights

Before use:

npm i
npm link

After use:

npm unlink

Usage

Examples

$ gcd current
2021-02-02T20:03:40.978Z
$ gcd current -y
2021
$ gcd add -m 4
2021-06-02T20:04:27.998Z
$ gcd sub -y 1 -m 4
2019-10-02T20:03:04.211Z

get-current-date's People

Contributors

carbongo avatar

Watchers

 avatar

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.