New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@beyonk/date-utils

Package Overview
Dependencies
Maintainers
4
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@beyonk/date-utils - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

9

lib/date-utils.js

@@ -6,2 +6,3 @@ import dayjs from 'dayjs/esm'

import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'
import duration from 'dayjs/plugin/duration'
import utc from 'dayjs/plugin/utc'

@@ -12,2 +13,3 @@ import timeZone from './plugin/timezone.plugin'

dayjs.extend(relativeTime)
dayjs.extend(duration)
dayjs.extend(isSameOrBefore)

@@ -90,6 +92,2 @@ dayjs.extend(isSameOrAfter)

function minsToDays (mins) {
return mins ? Math.ceil(mins / 24 / 60) : 0
}
function toTimeless (date) {

@@ -114,4 +112,3 @@ return dayjs(date).format('YYYY-MM-DD')

minsToTime,
timeToMins,
minsToDays
timeToMins
}

@@ -1,2 +0,2 @@

import { repeatSchedule, utcDate, minsToTime, timeToMins, minsToDays } from './date-utils.js'
import { repeatSchedule, utcDate, minsToTime, timeToMins } from './date-utils.js'
import { expect } from '@hapi/code'

@@ -88,36 +88,2 @@

})
describe('#minsToTime()', () => {
it('converts undefined to 0', () => {
expect(
minsToDays(undefined)
).to.equal(
0
)
})
it('converts 0 to 0', () => {
expect(
minsToDays(0)
).to.equal(
0
)
})
it('converts 640 to 1', () => {
expect(
minsToDays(640)
).to.equal(
1
)
})
it('converts 2488 to 2', () => {
expect(
minsToDays(2488)
).to.equal(
2
)
})
})
})
{
"name": "@beyonk/date-utils",
"version": "1.1.0",
"version": "1.2.0",
"description": "Beyonk Date Utils",

@@ -29,3 +29,3 @@ "author": "Antony Jones <aj@desirableobjects.co.uk>",

},
"gitHead": "f1e45d9779404cd430ed05af9d52b0e2cd22362c"
"gitHead": "e987cf0105450513288c3a9451b695e9b40c324d"
}
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