SHDate.checkWeek()
This method is used to validate the week in Hijri date.
Try it
Syntax
checkWeek(year: number, week: number, day: number): boolean;
Parameters
parameter | Description |
---|---|
year |
Necessary. The year is specified by a number between 1 and 3,500,000 |
week |
Necessary. A number between 1 and 53 specifies the week |
day |
Necessary. A number between 0 and 7 specifies the day of the week |
Return value
True
if the week is valid, False
otherwise.
Examples
let check = new SHDate();
let isTrue = check.checkWeek(1390, 11, 5);
console.log(isTrue); // true
// Static
isTrue = SHDate.checkWeek(1390, 53, 5);
console.log(isTrue); // false
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/checkWeek