Skip to content

WindomZ/gitdate.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  _______  __  .___________. _______       ___   .___________. _______ 
 /  _____||  | |           ||       \     /   \  |           ||   ____|
|  |  __  |  | `---|  |----`|  .--.  |   /  ^  \ `---|  |----`|  |__   
|  | |_ | |  |     |  |     |  |  |  |  /  /_\  \    |  |     |   __|  
|  |__| | |  |     |  |     |  '--'  | /  _____  \   |  |     |  |____ 
 \______| |__|     |__|     |_______/ /__/     \__\  |__|     |_______|
                                                                       

Greenkeeper badge Build Status License Dependency Standard - JavaScript Style Guide

After commit and before push, the last commit date is just a variable.

NPM

gitdate status

Install

npm install -g gitdate

Usage

$ gitdate -h

  Usage: gitdate [options] <date>

  git commit date trick.

  Options:

    -h, --help             output usage information
    -V, --version          output the version number
    -m --minute <minutes>  date offset +/-number of minutes
    -H --hour <hours>      date offset +/-number of hours
    -d --day <days>        date offset +/-number of days
    -M --month <months>    date offset +/-number of months
    -y --year <years>      date offset +/-number of years
    --debug                debug mode, such as print error tracks

  Argument:
    <date>        two formats: '15:04' or 'now'

Examples

$ gitdate 8:22                       # 08:22 today
$ gitdate 13:45 -d -1                # 13:45 yesterday
$ gitdate now                        # now, current time
$ gitdate now -H -3 -m 5             # now, subtract 3 hours, and plus 5 minutes
$ gitdate now -M -1 -d -2 -H 3 -m 5  # now, subtract 1 month 2 days, and plus 3 hours 5 minutes

Related

WindomZ/gitdate - Written in Go

License

MIT