Get date formate funtion as example : March 01,2022

   nextBilling(){

        var date = new Date();
        var validMonth = ['January','Febuary','March','April','May','June','July','August','September','October','November','December']
        var firstDay = new Date(date.getFullYear(), date.getMonth(),1).getDate();
        var month = new Date(date.getFullYear(), date.getMonth(),1).getMonth();
        var year = new Date(date.getFullYear(), date.getMonth(),1).getFullYear();
      this.netBillingDate = ` ${validMonth[month+1] +' '+firstDay+', '+year}`
      }

Comments

Popular posts from this blog

Become a Expert + Secret of Success -- ii

Change Detection

without writing media queries How to make responsive component