Socket
Socket
Sign inDemoInstall

@talend/utils

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@talend/utils - npm Package Compare versions

Comparing version 2.3.0 to 2.4.0

6

CHANGELOG.md
# @talend/utils
## 2.4.0
### Minor Changes
- 4961b509d: feat(TDC-6345): add MD date formatter
## 2.3.0

@@ -4,0 +10,0 @@

4

lib/date/index.d.ts

@@ -78,2 +78,4 @@ declare type DateFnsFormatInput = Date | number | string;

MDY: string;
/** en: 6/29 / fr: 29/06 / ja: 06/29 / de: 29.06 */
MD: string;
/** en: 6/29/20, 10:00 PM / fr: 29/06/2020 22:00 / ja: 2020/06/29 22:00 / de: 29.06.20, 22:00 */

@@ -102,2 +104,4 @@ MDYHM: string;

MDY: string;
/** en: 6/29 / fr: 29/06 / ja: 06/29 / de: 29.06 */
MD: string;
/** en: 6/29/20, 10:00 PM / fr: 29/06/2020 22:00 / ja: 2020/06/29 22:00 / de: 29.06.20, 22:00 */

@@ -104,0 +108,0 @@ MDYHM: string;

@@ -203,2 +203,5 @@ "use strict";

/** en: 6/29 / fr: 29/06 / ja: 06/29 / de: 29.06 */
MD: 'MD',
/** en: 6/29/20, 10:00 PM / fr: 29/06/2020 22:00 / ja: 2020/06/29 22:00 / de: 29.06.20, 22:00 */

@@ -223,2 +226,6 @@ MDYHM: 'MDYHM'

},
[FORMAT.MD]: {
month: 'numeric',
day: 'numeric'
},
[FORMAT.MDYHM]: {

@@ -225,0 +232,0 @@ dateStyle: 'short',

2

package.json
{
"name": "@talend/utils",
"version": "2.3.0",
"version": "2.4.0",
"description": "Various utilities",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -262,3 +262,14 @@ import dateFnsFormat from 'date-fns/format';

});
it('should format date without year', () => {
// given
const dateObj = new Date('2020-05-13, 20:00');
// then
expect(format(dateObj, FORMAT.MD, 'fr')).toEqual('13/05');
// and
expect(format(dateObj, FORMAT.MD, 'en')).toEqual('5/13');
});
});
});

@@ -199,2 +199,4 @@ import dateFnsFormat from 'date-fns/format';

MDY: 'MDY',
/** en: 6/29 / fr: 29/06 / ja: 06/29 / de: 29.06 */
MD: 'MD',
/** en: 6/29/20, 10:00 PM / fr: 29/06/2020 22:00 / ja: 2020/06/29 22:00 / de: 29.06.20, 22:00 */

@@ -208,2 +210,3 @@ MDYHM: 'MDYHM',

[FORMAT.MDY]: { year: 'numeric', month: '2-digit', day: '2-digit' },
[FORMAT.MD]: { month: 'numeric', day: 'numeric' },
[FORMAT.MDYHM]: { dateStyle: 'short', timeStyle: 'short' },

@@ -210,0 +213,0 @@ } as DateFormatOptions;

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