
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@progress/kendo-date-math
Advanced tools
Kendo UI typescript package exporting functions for Date manipulations
@progress/kendo-date-math is a JavaScript library that provides utilities for date and time manipulation. It is part of the Kendo UI suite and offers a range of functionalities for working with dates, including parsing, formatting, and performing arithmetic operations.
Date Parsing
This feature allows you to parse a date string into a JavaScript Date object using a specified format.
const { parseDate } = require('@progress/kendo-date-math');
const date = parseDate('2023-10-01', 'yyyy-MM-dd');
console.log(date);
Date Formatting
This feature allows you to format a JavaScript Date object into a string using a specified format.
const { formatDate } = require('@progress/kendo-date-math');
const date = new Date(2023, 9, 1);
const formattedDate = formatDate(date, 'yyyy-MM-dd');
console.log(formattedDate);
Date Arithmetic
This feature allows you to perform arithmetic operations on dates, such as adding or subtracting days.
const { addDays } = require('@progress/kendo-date-math');
const date = new Date(2023, 9, 1);
const newDate = addDays(date, 5);
console.log(newDate);
Date Comparison
This feature allows you to compare two dates. It returns a negative number if the first date is earlier, zero if they are equal, and a positive number if the first date is later.
const { compare } = require('@progress/kendo-date-math');
const date1 = new Date(2023, 9, 1);
const date2 = new Date(2023, 9, 5);
const comparison = compare(date1, date2);
console.log(comparison);
Moment.js is a widely-used library for parsing, validating, manipulating, and formatting dates in JavaScript. It offers a comprehensive set of features for date and time manipulation, similar to @progress/kendo-date-math, but is more established and has a larger community.
date-fns is a modern JavaScript date utility library that provides a wide range of functions for manipulating dates. It is modular, allowing you to import only the functions you need, which can result in smaller bundle sizes compared to @progress/kendo-date-math.
Luxon is a library for working with dates and times in JavaScript. It is a modern alternative to Moment.js, offering a more powerful and flexible API. Luxon provides similar functionalities to @progress/kendo-date-math but with a focus on modern JavaScript features and better performance.
This package is part of the Kendo UI for Angular, KendoReact and Kendo UI for Vue suites.
This is commercial software. To use it, you need to agree to the Telerik End User License Agreement for Kendo UI (for Kendo UI for Angular and Kendo UI for Vue) or to the End User License Agreement for Progress KendoReact (for KendoReact). If you do not own a commercial license, this file shall be governed by the trial license terms.
All available Kendo UI commercial licenses may be obtained at http://www.telerik.com/purchase/kendo-ui.
Copyright © 2022 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.
FAQs
Kendo UI typescript package exporting functions for Date manipulations
The npm package @progress/kendo-date-math receives a total of 141,166 weekly downloads. As such, @progress/kendo-date-math popularity was classified as popular.
We found that @progress/kendo-date-math demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.