• 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
New to Kendo UI for Angular? Start a free 30-day trial

toLocalDate

A function that creates a local date from the UTC date parts of the input.

import { toLocalDate } from '@progress/kendo-date-math'

const date = new Date('2016-11-05');
const local = toLocalDate(date);

// For example, if the browser is in GMT+0200,
// the local date will be shifted 2 hours back:
//
// "Fri Nov 04 2016 22:00:00 GMT+0200"
console.log(local);

// This is the same as the UTC parts of the input date:
//
// "2016-11-05T22:00:00.000Z"
console.log(date.toISOString());

Parameters

date Date

The date value that will be converted. Only the UTC date parts are read.

Returns

Date Date - A local date with the UTC time parts of the supplied date.

In this article

Not finding the help you need?