how can i get the first day of the pre month

how can i get the first day of the pre month in Bash

Try like this..
FirstDay

date -d "-1 month -$(($(date +%d)-1)) days"

Lastday

date -d "-$(date +%d) days -1 month"

rajendar2020 thank you.
I try it(date -d "-1 month -$(($(date +%d)-1)) days"),
but it don't work.and those messages was responsed.
date: illegal option -- d
date: illegal option -- 1
date: illegal option --
date: illegal option -- m
date: illegal option -- o
date: illegal option -- n
date: illegal option -- t
date: illegal option -- h
...

Try this,

#!/bin/sh
cur_month=$(date +%m)
if [ $cur_month == "01" ]
then
prev_month=12
prev_year=$(($(date +%Y)-1))
else
prev_month=$(($(date +%m)-1))
prev_year=$(date +%Y)
fi
cal $prev_month $prev_year | awk -v v1=$prev_month -v v2=$prev_year 'BEGIN{a[1]="Saturday";a[2]="Friday";a[3]="Thursday";a[4]="Wednsday";a[5]="Tuesday";a[6]="Monday";a[7]="Sunday"} NR==3{print "01/"v1"/"v2,a[NF]}'