How to get last quarter dates. JavaScript

function getLastQuarterDates() { var quarter, year; if(moment().quarter() == 1){ quarter = 4; year = moment().subtract(1, 'year').format("YYYY"); } else{ quarter = moment().quarter() -1; year = moment().format("YYYY"); } var firstDate = moment('1.'+( (quarter*3) - 2) + "." + year, "DD.MM.YYYY"); var lastDate = moment('1.'+( (quarter*3)) + "." + year, "DD.MM.YYYY").endOf('month'); return { 'firstDate' : firstDate, 'lastDate' : lastDate, 'year': year, 'quarter': quarter }; }

VMware. CentOs /Ubuntu. How to mount shared folder.

Virtual Machine settings

  • Folder sharing = Always Enabled
  • Make sure you have at least one Folder shared between the host and guest

On the Linux (Cent OS/Ubuntu)

  • check /mnt/hgfs that you can access your shared folder.

    If you don't see your shared folders (automounted) inside /mnt/hgfs , run VMware configuration tools:

    sudo vmware-config-tools.pl