• Compares two string formated dates/times *

    Parameters

    • first: string

      first date as string *

    • second: string

      second date as string *

    Returns boolean

    true if the string formated dates/times represent the same date/time *

    • 
      
    • // suppose the timezone is PDT
    • const datetimeString1 = '2021-03-25';
    • const datetimeString2 = '2021-03-24T17:00:00';
    • compareDateStrings(datetimeString1, datetimeString2); // true
    •