项目作者: WindomZ

项目描述 :
git commit date trick
高级语言: Go
项目地址: git://github.com/WindomZ/gitdate.git
创建时间: 2017-04-17T16:49:05Z
项目社区:https://github.com/WindomZ/gitdate

开源协议:MIT License

下载


gitdate

Build Status
License
Go Report Card

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

v1.1.0
status

Installation

To get the package, execute:

  1. go get github.com/WindomZ/gitdate

Usage

  1. $ gitdate -h
  2. Usage:
  3. gitdate <date> [-m=<minutes>|--minute=<minutes>] [-H=<hours>|--hour=<hours>] [-d=<days>|--day=<days>] [-M=<months>|--month=<months>] [-y=<years>|--year=<years>]
  4. gitdate -h|--help
  5. gitdate -v|--version
  6. Options:
  7. -m --minute <minutes>
  8. date offset +/-number of minutes
  9. -H --hour <hours>
  10. date offset +/-number of hours
  11. -d --day <days>
  12. date offset +/-number of days
  13. -M --month <months>
  14. date offset +/-number of months
  15. -y --year <years>
  16. date offset +/-number of years
  17. -h --help output usage information
  18. -v --version output the version number
  19. Argument:
  20. <date> two formats: '15:04' or '15:04:05' or 'now'

Example

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

PowerBy

go-commander - The solution for building command shell programs

WindomZ/gitdate.js - Written in Node.js

License

The MIT License