• Getting Started
  • Components
    • Barcodes
    • Buttons
    • Chartsupdated
    • Conversational UIupdated
    • Data Query
    • Date Inputsupdated
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Filter
    • Gantt
    • Gauges
    • Gridupdated
    • Icons
    • Indicators
    • Inputsupdated
    • Labels
    • Layout
    • ListBox
    • ListView
    • Map
    • Menus
    • Navigation
    • Notification
    • Pager
    • PDF Export
    • PDFViewer
    • PivotGridupdated
    • Popup
    • ProgressBars
    • Ripple
    • Schedulerupdated
    • ScrollView
    • Sortable
    • Spreadsheetupdated
    • ToolBar
    • Tooltips
    • TreeList
    • TreeView
    • Typography
    • Uploads
    • Utilities
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Sample Applications
  • FAQ
  • Troubleshooting
  • Updates
  • Changelogs

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 Angular, a professional grade UI library with 110+ 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