Getting Started with the Kendo UI Date Math

This guide provides the information you need to start using the Kendo UI Date Math—it includes instructions about the installation approach, how to import the required methods, and links to additional resources.

The Date Math Package is part of Kendo UI for Vue, a professional grade UI library with 100+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

Installing the Package

To add the Kendo UI Date Math package, run the following command:

npm install --save @progress/kendo-date-math

Using the Package

  1. After successfully installing the Date Math, import the required individual functions from the package:

    import { weekInYear, addDays } from '@progress/kendo-date-math';
  2. Then you can perform the desired date manipulations. The following code snippet demonstrates how to calculate the week number, based on a given date, using the weekInYear function:

    const date = new Date(2000, 10, 10);
    const weekNumber = weekInYear(date);
    
    console.log(weekNumber);
    // Returns the week number of the corresponding date.
    

Dependencies

The Kendo UI Date Math package has no external dependencies.

Next Steps