Giter Club home page Giter Club logo

moment's Introduction

moment

NPM version NPM quality Coverage Status Dependencies Build Status Known Vulnerabilities NPM download license issues

A minimalist JavaScript library that parses, validates, manipulates, and displays dates and times for modern browsers with a largely Moment.js-compatible API, written with TypeScript, inspired by Dayjs and Moment.js

moment().startOf('month').add(1, 'day').set('year', 2019).format('YYYY-MM-DD HH:mm:ss');
  • ๐Ÿ•’ Familiar Moment.js API & patterns
  • ๐Ÿ’ช Immutable
  • ๐Ÿ”ฅ Chainable
  • โ‡๏ธ TypeScript
  • ๐ŸŒ I18n support (WIP, will be soon)
  • ๐Ÿ”Œ Plugin System (WIP, will be soon)

Install

$ npm install @zcorky/moment

Usage

// typescript
import moment from '@zcorky/moment';

moment('2018-08-08') // parse

moment().format('{YYYY} MM-DDTHH:mm:ss SSS [Z] A') // display

moment().set('month', 3).month() // get & set

moment().add(1, 'year') // manipulate

Relatived

  • dayjs - immutable date time library alternative to Moment.js with the same modern API.
  • moment - Parse, validate, manipulate, and display dates in javascript.
  • luxon - โฑ A library for working with dates and times in JS.

License

MIT ยฉ Moeover

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.