Components
    • Animation
    • Barcodes
    • Buttons
    • Charts
    • Common Utilities
    • Conversational UI
    • Data Grid
    • Data Query
    • Data Tools
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdowns
    • Editor
    • Excel Export
    • File Saver
    • Form
    • Gantt
    • Gauges
    • Indicators
    • Inputs
    • Labels
    • Layout
    • ListBox
    • ListView
    • Mapbeta
    • Notification
    • PDF Processing
    • PivotGrid
    • Popup
    • Progress Bars
    • Ripple
    • Scheduler
    • ScrollView
    • Sortable
    • TaskBoard
    • Tooltips
    • TreeList
    • TreeView
    • Upload
    Sample Applications
    Styling & Themes
    Common Features
    Project Setup
    Changelog

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.


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