Skip to content

Documentation / jalali-js / startOf

Function: startOf() ​

startOf(date, unit, system, weekStartDay?): CalendarDateFields

Defined in: date-math.ts:118

The first day of the week, month, or year containing date, in system. A week's start day varies by culture, so weekStartDay is a parameter (a dayOfWeek() index); it defaults to WEEK_START_DAY[system] and is ignored for the other units.

Parameters ​

date ​

CalendarDateFields

unit ​

PeriodUnit

system ​

CalendarSystem

weekStartDay? ​

number = ...

Returns ​

CalendarDateFields