Socket
Socket
Sign inDemoInstall

dayjs

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dayjs - npm Package Compare versions

Comparing version 1.5.24 to 1.6.0

CHANGELOG.md

21

.eslintrc.json

@@ -21,4 +21,25 @@ {

"never"
],
"no-param-reassign": [
0
],
"func-names": [
0
],
"import/no-extraneous-dependencies": [
0
],
"import/no-unresolved": [
2,
{
"ignore": [
"dayjs"
]
}
],
"import/extensions": [
2,
"ignorePackages"
]
}
}

3

karma.sauce.conf.js

@@ -85,3 +85,3 @@ module.exports = function (config) {

files: [
'dist/*.js',
'dayjs.min.js',
'test/*spec.js'

@@ -94,2 +94,3 @@ ],

sauceLabs: {
// build: 'Manual',
testName: 'Day.js'

@@ -96,0 +97,0 @@ },

{
"name": "dayjs",
"version": "1.5.24",
"description": "2KB immutable date library alternative to Moment.js with the same modern API ",
"main": "dist/dayjs.min.js",
"version": "1.6.0",
"description": "2KB immutable date time library alternative to Moment.js with the same modern API ",
"main": "dayjs.min.js",
"types": "index.d.ts",
"scripts": {
"test": "jest",
"lint": "./node_modules/.bin/eslint src/* test/*",
"build": "BABEL_ENV=build rollup -c",
"lint": "./node_modules/.bin/eslint src/* test/* build/*",
"build": "BABEL_ENV=build node build",
"sauce": "npx karma start karma.sauce.conf.js",
"test:sauce": "npm run sauce -- 0 && npm run sauce -- 1 && npm run sauce -- 2 && npm run sauce -- 3",
"gzip-size": "gzip-size ./dist/*.min.js"
"gzip-size": "gzip-size dayjs.min.js"
},

@@ -19,9 +19,20 @@ "pre-commit": [

"jest": {
"testRegex": "test/.*test.js$",
"roots": [
"test"
],
"testRegex": "test/(.*?/)?.*test.js$",
"coverageDirectory": "./coverage/",
"collectCoverage": true,
"collectCoverageFrom": [
"src/*"
"src/**/*"
]
},
"release": {
"prepare": [
{
"path": "@semantic-release/changelog"
},
"@semantic-release/git"
]
},
"keywords": [

@@ -28,0 +39,0 @@ "dayjs",

@@ -20,5 +20,9 @@ English | [简体中文](./README.zh-CN.md)

src="https://img.shields.io/npm/l/dayjs.svg?style=flat-square" alt="License"></a>
<br>
<a href="https://saucelabs.com/u/dayjs">
<img width="750" src="https://user-images.githubusercontent.com/17680888/40040137-8e3323a6-584b-11e8-9dba-bbe577ee8a7b.png" alt="Sauce Test Status">
</a>
</p>
> Day.js is a minimalist JavaScript library for modern browsers with a largely Moment.js-compatible API. If you use Moment.js, you already know how to use Day.js.
> Day.js is a minimalist JavaScript library that parse, validate, manipulate, and display dates and times for modern browsers with a largely Moment.js-compatible API. If you use Moment.js, you already know how to use Day.js.

@@ -33,3 +37,3 @@ ```js

* 📦 2kb mini library
* 👫 All browsers support
* 👫 All browsers supported

@@ -347,4 +351,4 @@ ---

| ------ | ---------------- | ------------------------------------- |
| `YY` | 18 | Two digit year |
| `YYYY` | 2018 | Four digit year |
| `YY` | 18 | Two-digit year |
| `YYYY` | 2018 | Four-digit year |
| `M` | 1-12 | The month, beginning at 1 |

@@ -376,3 +380,3 @@ | `MM` | 01-12 | The month, 2-digits |

Get the difference of two `Dayjs` object in milliseconds or other unit.
Get the difference of two `Dayjs` objects in milliseconds or another unit.

@@ -426,3 +430,3 @@ ```js

* returns a Array
* returns an Array

@@ -439,3 +443,3 @@ Returns an array that mirrors the parameters from new Date().

Serializing an `Dayjs` to JSON, will return an ISO8601 string.
Serializing a `Dayjs` object to JSON, will return an ISO8601 string.

@@ -458,3 +462,3 @@ ```js

* returns a Object
* returns an Object

@@ -461,0 +465,0 @@ Returns an object with year, month ... millisecond.

@@ -19,2 +19,6 @@ [English](./README.md) | 简体中文

src="https://img.shields.io/npm/l/dayjs.svg?style=flat-square" alt="License"></a>
<br>
<a href="https://saucelabs.com/u/dayjs">
<img width="750" src="https://user-images.githubusercontent.com/17680888/40040137-8e3323a6-584b-11e8-9dba-bbe577ee8a7b.png" alt="Sauce Test Status">
</a>
</p>

@@ -21,0 +25,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc