Abstraction over common javascript date management libraries
MIT License
Bot releases are hidden (Show)
Published by dmtrKovalenko over 4 years ago
N/A
Published by dmtrKovalenko over 4 years ago
This release is only fixing inclusivity rules of isWithinRange
method.
Published by dmtrKovalenko over 4 years ago
N/A
New functions:
isWithinRange: (date: TDate, range: [TDate, TDate]) => boolean
addMonths: (date: TDate, monthCount: number) => TDate
Published by dmtrKovalenko over 4 years ago
Add 2 new functions:
startOfWeek(date: TDate): TDate
- returns start of weekendOfWeek(date: TDate): TDate
- returns end of weekPublished by dmtrKovalenko over 4 years ago
toJsDate
function converting lib object to native js datePublished by dmtrKovalenko over 4 years ago
We have changed the formats tokens to use localized formats tokens everywhere possible. Also introduced several new methods and formats
List of new methods added:
Published by dmtrKovalenko almost 5 years ago
dateTimeFormat
formats
prop and provides easy localization formattingexport 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;
}
format
method now has signature (date: TDate, formatKey: keyof IDateIOFormat) => string
in order to simplify formatting using new format keysformatByString
allowes to use custom (mostly user-provided) format strings formatByString(value: TDate, formatString: string): string;
Published by dmtrKovalenko almost 5 years ago
Published by dmtrKovalenko almost 5 years ago
We are changing the dependency strategy, so date-io will stop generating thousands of console peer dependencies warning. @LinusU
Published by dmtrKovalenko about 5 years ago
dependecies
(lerna, typescript)Published by dmtrKovalenko about 5 years ago
This is a patch release with the following updates:
date-fns
options by overriding only one format
methodPublished by dmtrKovalenko over 5 years ago
🎉 Published @date-io/hijiri
adapter that wrapping up moment-hijiri
Published by dmtrKovalenko over 5 years ago
This release comes with changed a policy of locale
passing to the inner lib instance. It will pass the locale down to the moment
or dayjs
on each invocation, instead of relying on global locale
Published by dmtrKovalenko over 5 years ago
Make imports in @date-io/type
to be inside declaration block
Published by dmtrKovalenko over 5 years ago
This release adds better support of typescript typings.
Added new ts-only module @date-io/type
that contains type definition for particular date library.
Published by dmtrKovalenko over 5 years ago
Make sure that moment
constructor option is deprecated since the current release. Use instance
instead.
Published by dmtrKovalenko over 5 years ago
📅 Support of dayjs 📅
Published by dmtrKovalenko over 5 years ago
Fix of luxon's isValid
crashing when passing null
| undefined
Published by dmtrKovalenko over 5 years ago
Here what's changed:
🚫
moment-jalaali
adoption.yearFormat
, yearMonthFormat
, setMonth
, getMonthArray
, getMonthText
(#17) @OleksiiKukuruzaREADME.md
Published by dmtrKovalenko almost 6 years ago
🎉 Stable release 🎉
We are now more stable and we have 100% test coverage
Breaking changes:
getStartOfMonth
to startOfMonth
for better consistencyFixes
isAfterDay