Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@date-io/core

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@date-io/core - npm Package Compare versions

Comparing version 2.17.0 to 3.0.0

35

IUtils.d.ts

@@ -69,7 +69,11 @@ export interface DateIOFormats<TLibFormatToken = string> {

export interface ExtendableDateType {}
type ConstructorOptions<TLocale> = {
formats?: Partial<DateIOFormats>;
locale?: TLocale;
instance?: any;
};
export interface IUtils<TDate extends ExtendableDateType> {
export interface IUtils<TDate, TLocale> {
formats: DateIOFormats<any>;
locale?: any;
locale?: TLocale;
moment?: any;

@@ -80,5 +84,26 @@ dayjs?: any;

// constructor (options?: { formats?: DateIOFormats, locale?: any, instance?: any });
// Constructor type
// new (options?: {
// formats?: Partial<DateIOFormats>;
// locale?: TLocale;
// instance?: any;
// }): IUtils<TDate, TLocale>;
date(value?: any): TDate | null;
/**
* Creates a date object. Use `utils.date()` to create a new date object of the underlying library.`
* Supports some of the standard input sources like ISO strings so you can pass the string directly
* as `utils.date("2024-01-10T14:30:00Z"), and javascript `Date` objects `utils.date(new Date())`.
*
* if `null` is passed `null` will be returned.
*/
date<
TArg extends unknown = undefined,
TResultingDate extends unknown = TArg extends null
? null
: TArg extends undefined
? TDate
: TDate | null
>(
value?: TArg
): TResultingDate;
toJsDate(value: TDate): Date;

@@ -85,0 +110,0 @@ parseISO(isString: string): TDate;

4

package.json
{
"name": "@date-io/core",
"version": "2.17.0",
"version": "3.0.0",
"description": "Abstraction over common javascript date management libraries",

@@ -34,3 +34,3 @@ "scripts": {

},
"gitHead": "e497a04c456f04211c8b0877d002c85e72ea98a2"
"gitHead": "9d304288545a0a9c9f4e3b8aefd428da3757d330"
}
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