Giter Club home page Giter Club logo

timetool's Introduction

TimeTool

时间工具类,毫秒转你想要的时间格式。各种格式转毫秒等 当前版本1.0

    //毫秒转换  默认  "yyyy-MM-dd HH:mm:ss"
    TimeChange.getInstanceSafe().getTimeStr(System.currentTimeMillis());
    //毫秒转换  你需要的  比如 :"MM-dd"
    TimeChange.getInstanceSafe().getTimeStr(System.currentTimeMillis(), "MM-dd");
    //字符串转换   你需要的  比如 :"MM-dd"
    TimeChange.getInstanceSafe().getTimeStr("2020-12-12 00:00:00", "MM-dd");
    //字符串转换   后台给的格式 如2020/12/12 00:00:00   、 2020年12月12日 00时00分00秒
    TimeChange.getInstanceSafe().getTimeStr("2020/12/12 00:00:00", "yyyy/MM/dd HH:mm:ss", "MM-dd");
    TimeChange.getInstanceSafe().getTimeStr("2020-12-12 00:00:00", "yyyy年MM月dd日 HH时mm分ss秒", "MM-dd");
    //刚刚   10秒前   1小时    等等
    TimeChange.getInstanceSafe().getTimeLossStr(TimeChange.getInstanceSafe().getTimeStr(System.currentTimeMillis() - 10), null);
    //转毫秒
    TimeChange.getInstanceSafe().getTimemIllisecond("2020/12/12 00:00:00");

dependencies {

        implementation 'com.github.zeo0212:TimeTool:1.0'

}

timetool's People

Contributors

zeo0212 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.