Coder Social home page Coder Social logo

timemark's People

Contributors

chenshuai2144 avatar colincll avatar seognil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

timemark's Issues

2.0需求功能讨论。建议意见需求展望等都可以在下面填

1.支持更复杂配置
2.内置format函数,并暴露
3.不再内置输出结果,赋予用户自由输出的灵活性。
4.可以根据时间差步长的大于、小于、等于、倍数、默认来定制输出规则。允许用户通过简单配置实现复杂判断逻辑。
5.支持全局默认配置,减少用户重复操作。允许覆盖配置,允许用户在全局配置后完成特殊需求。
6.支持script导入支持web,webworker,node等多环境使用

// 简单例子:第二个参数是Object
timemark(endTime, {
  startTime: new Date(),
  rules: {
    // 等于
    eq: [
      {step: 86400, formatter: (param) {
        // "yyyy-MM-dd"
        return "今天"
      }},
      {step: 86400 * 2, formatter: "明天"}
    ]
  }
})

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.