Socket
Socket
Sign inDemoInstall

@dpc-sdp/ripple-global

Package Overview
Dependencies
Maintainers
3
Versions
246
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dpc-sdp/ripple-global - npm Package Compare versions

Comparing version 1.0.0-alpha.17 to 1.0.0-alpha.18

19

mixins/formatdate.js

@@ -5,3 +5,4 @@ import moment from 'moment'

props: {
locale: { default: 'en-au', type: String }
locale: { default: 'en-au', type: String },
rangeDivider: { default: ' to ', type: String }
},

@@ -13,2 +14,18 @@ methods: {

return moment(date).format(format)
},
formatDateRange: function (dateStart, dateEnd) {
moment.locale(this.locale)
let rtn = ''
const start = moment(dateStart)
const end = moment(dateEnd)
if (start.isSame(end, 'day')) {
rtn = this.formatDate(start)
} else if (start.isSame(end, 'month')) {
rtn = `${start.format('DD')}${this.rangeDivider}${end.format('DD MMMM')}`
} else if (start.isSame(end, 'year')) {
rtn = `${start.format('DD MMMM')}${this.rangeDivider}${end.format('DD MMMM')}`
} else {
rtn = `${start.format('DD MMMM YYYY')}${this.rangeDivider}${end.format('DD MMMM YYYY')}`
}
return rtn
}

@@ -15,0 +32,0 @@ }

2

package.json
{
"name": "@dpc-sdp/ripple-global",
"version": "1.0.0-alpha.17",
"version": "1.0.0-alpha.18",
"description": "The core styles and utilities used by all ripple components. Includes sets of colours, fonts, breakpoints.",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

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