Вы можете сделать это, используя PHP, как показано ниже:
$workdays = array();
$type = CAL_GREGORIAN;
$month = date('n'); // Month ID, 1 through to 12.
$year = date('Y'); // Year in 4 digit 2009 format.
$day_count = cal_days_in_month($type, $month, $year); // Get the amount of days
//loop through all days
for ($i = 1; $i <= $day_count; $i++) {
$date = $year.'/'.$month.'/'.$i; //format date
$get_name = date('l', strtotime($date)); //get week day
$day_name = substr($get_name, 0, 3); // Trim day name to 3 chars
//if not a weekend add day to array
if($day_name != 'Sun' && $day_name != 'Sat'){
$workdays[] = date( "Y-m-d", strtotime($i."-".$month."-".$year));
}
}
print_r($workdays);
Выход:
Array
(
[0] => 2020-03-02
[1] => 2020-03-03
[2] => 2020-03-04
[3] => 2020-03-05
[4] => 2020-03-06
[5] => 2020-03-09
[6] => 2020-03-10
[7] => 2020-03-11
[8] => 2020-03-12
[9] => 2020-03-13
[10] => 2020-03-16
[11] => 2020-03-17
[12] => 2020-03-18
[13] => 2020-03-19
[14] => 2020-03-20
[15] => 2020-03-23
[16] => 2020-03-24
[17] => 2020-03-25
[18] => 2020-03-26
[19] => 2020-03-27
[20] => 2020-03-30
[21] => 2020-03-31
)