Search
DateTime.getWeekFirstDate Method
See Also
 






Returns the beginning of the week of the specified DateTime.

Namespace: MindFusion.Scheduling
File: DateTime.js

 Syntax

JavaScript  Copy Code

function getWeekFirstDate (date, [formatInfo])

 Parameters

date

A DateTime instance.

formatInfo
Optional.

Object. The formatInfo object.

 Return Value

A DateTime instance specifying the beginning of the week.

 Example

The following code gets the beginning of the week, which contains the current date of the calendar:

JavaScript  Copy Code
var p = MindFusion.Scheduling;
....
var startDate = p.DateTime.getWeekFirstDate(calendar.date);

 See Also