Git Product home page Git Product logo

instant's Introduction

instant

Make JSR310 available from terminal

Usage

$ instant
2006-01-02T15:04:05.600Z

$ instant -f unix
1136214245000

$ instant -d 2020-01-02
2020-01-02T00:00:00Z

$ instant -d 2020-01-02 -f unix
1577923200000

$ instant -t 03:04:05
2006-01-02T03:04:05Z

$ instant -f "uuuu/MM/dd hh:mm:ssZ"
2006/01/02 15:04:05+00:00

$ instant -a PT30M
2006-01-02T15:34:05.600Z

instant's People

Contributors

mike-neck avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

instant's Issues

dオプションが動作しません

最新バージョンと思われるv0.3.0をダウンロードして試しました。

➜  ~ ./instant --version
instant version v0.3.0
Build OS: Mac OS X, 10.15.5, x86_64
With JVM: 11.0.6(Oracle Corporation Substrate VM GraalVM 20.0.0 CE)
Powered by Picocli 4.2.0

READMEにある、日付指定の -d オプションが利用できませんでした。
サポート外でしょうか。

➜  ~ ./instant -d 2020-08-11
Unknown options: '-d', '2020-08-11'
Usage: instant [-hV] [-a=<duration>] [-f=<format>] [-z=<timeZone>]
  -a, --add, --add-duration=<duration>
                          Add duration to instant. The format is 'PnDTnHnMn.nS'.
                          The 'P' is fixed char.
                          The 'nD' means days.
                          The 'T' is fixed char required if inputting times.
                          The 'nH' means hours.
                          The 'nM' means minutes.
                          The 'n.nS' means seconds and fractional seconds. The
                            fractional seconds is optional.
                          default: ''(empty)
  -f, --format=<format>   Specifies output format. Available values are 'unix'
                            or DateTimeFormatter pattern. default:
                            uuuu-MM-dd'T'HH:mm:ss.nX
  -h, --help              Show this help message and exit.
  -V, --version           Print version information and exit.
  -z, --zone, --time-zone=<timeZone>
                          Specifies time-zone to show the time of instant.
                          Available values are integer(difference from UTC in
                            hours), zone ids(like PST8PDT, Asia/Tokyo).
                          default: null

確かにusageには出てきませんでした。

➜  ~ ./instant --help
Usage: instant [-hV] [-a=<duration>] [-f=<format>] [-z=<timeZone>]
  -a, --add, --add-duration=<duration>
                          Add duration to instant. The format is 'PnDTnHnMn.nS'.
                          The 'P' is fixed char.
                          The 'nD' means days.
                          The 'T' is fixed char required if inputting times.
                          The 'nH' means hours.
                          The 'nM' means minutes.
                          The 'n.nS' means seconds and fractional seconds. The
                            fractional seconds is optional.
                          default: ''(empty)
  -f, --format=<format>   Specifies output format. Available values are 'unix'
                            or DateTimeFormatter pattern. default:
                            uuuu-MM-dd'T'HH:mm:ss.nX
  -h, --help              Show this help message and exit.
  -V, --version           Print version information and exit.
  -z, --zone, --time-zone=<timeZone>
                          Specifies time-zone to show the time of instant.
                          Available values are integer(difference from UTC in
                            hours), zone ids(like PST8PDT, Asia/Tokyo).
                          default: null

もし利用法間違ってたらご指摘ください。

adjust release

Adjust release process, because release action is broken.

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.