AppsScriptPulse

Check if a date is more than a month ago

Recently during a consultation I was asked if it would be possible to check if the date submitted on a Google form was over a month ago, to which I responded “sure …”.

Admittedly this was a lot more difficulty than I thought it would (and should) be – I was bamboozled by online forums and posts suggesting to convert dates into numbers and perform other incoherent functions to achieve this. Eventually however I came across the single JavaScript function that I would need to achieve this feat …… ‘getMonth’.

Source: The Gift of Script: Check if a date is more than a month ago

Leave a Reply

Your email address will not be published. Required fields are marked *