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 1.3.13 to 2.0.0

70

IUtils.d.ts

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

export interface DateIOFormats {
/** Full date, useful for accessibility @example "2019, January 1st" */
fullDate: string;
/** Day format string extremely required to localize @example "Wed, Jan 1st" for US, "January 1st" for Europe */
normalDate: string;
/** Shorter day format @example "Jan 1st" */
shortDate: string;
/** Year format string @example "2019" */
year: string;
/** Month format string @example "January" */
month: string;
/** Short month format string @example "Jan" */
monthShort: string;
/** Short month format string @example "January 2018" */
monthAndYear: string;
/** Month with date format string @example "January 1st" */
monthAndDate: string;
/** Day format string @example "12" */
dayOfMonth: string;
/** Full time format string @example "11:44 PM" */
fullTime12h: string;
/** Full time format string @example "23:59" */
fullTime24h: string;
/** Hours format string @example "11" */
hours12h: string;
/** Hours format string @example "23" */
hours24h: string;
/** Minutes format string @example "59" */
minutes: string;
/** Seconds format string @example "59" */
seconds: string;
/** Date & Time format string @example "2018, Jan 1st 11:44 PM" */
fullDateTime12h: string;
/** Date & Time format string @example "2018, Jan 1st 23:44" */
fullDateTime24h: string;
/** Keyboard input friendly date format @example "2019/01/01" */
keyboardDate: string;
/** Keyboard input friendly date/time 12h format @example "2019/01/01 23:44" */
keyboardDateTime12h: string;
/** Keyboard input friendly date/time 24h format @example "2019/01/01 11:44 PM" */
keyboardDateTime24h: string;
}
export interface IUtils<TDate> {
formats: DateIOFormats;
locale?: any;

@@ -6,14 +50,4 @@ moment?: any;

yearFormat: string;
yearMonthFormat: string;
// constructor (options?: { formats?: DateIOFormats, locale?: any, instance?: any });
dateTime12hFormat: string;
dateTime24hFormat: string;
time12hFormat: string;
time24hFormat: string;
dateFormat: string;
// constructor (options?: { locale?: any, moment?: any });
date(value?: any): TDate | null;

@@ -48,3 +82,4 @@ parse(value: string, format: string): TDate | null;

format(value: TDate, formatString: string): string;
format(value: TDate, formatKey: keyof DateIOFormats): string;
formatByString(value: TDate, formatString: string): string;
formatNumber(numberToFormat: string): string;

@@ -77,13 +112,4 @@

// displaying methods
/** Allow to customize displaying "am/pm" strings */
getMeridiemText(ampm: "am" | "pm"): string;
getCalendarHeaderText(date: TDate): string;
getDatePickerHeaderText(date: TDate): string;
getDateTimePickerHeaderText(date: TDate): string;
getMonthText(date: TDate): string;
getDayText(date: TDate): string;
getHourText(date: TDate, ampm: boolean): string;
getMinuteText(date: TDate): string;
getSecondText(date: TDate): string;
getYearText(date: TDate): string;
}
{
"name": "@date-io/core",
"version": "1.3.13",
"version": "2.0.0",
"description": "Abstraction over common javascript date management libraries",

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

},
"gitHead": "d105764c36b2021cde1fbcddd5445fed582a511c"
"gitHead": "29c8f93efe8086a1b5ebb51b0a99d669219d4cbf"
}
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