       row.origin = locationNameToCode[row.donor]
       row.dest = locationNameToCode[row.recipient]
 
-      if IMPORT_COMMITMENT_DATES_AS_DATES
+      # won't work for negative dates as long as https://jira.mongodb.org/browse/SERVER-961 is not fixed
+      if IMPORT_COMMITMENT_DATES_AS_ is "date"
         for f,q of dateFields 
           if row[f]?
             row[f] = { "$date" : row[f] }

console.log ">>>>>>>>>> Importing AidData >>>>>>>>>>"

fs = require 'fs'

      "end_date" : "end_date"
    
    dateFieldsSelect = (dateFieldQ(f,q) for f,q of dateFields).join(',') 

    query = pgclient.query "
        SELECT
