 
   test.done()
 
-# Test that the default setting for DATEFIRST is 7
-exports.testDatefirstDefault = (test) ->
+testDateFirstImpl = (test, dateFirst) =>
   test.expect(3)
 
   config = getConfig()
+  config.options.datefirst = dateFirst
 
   connection = new Connection(config)
 

        test.ok(err instanceof Error)
        test.strictEqual err?.number, 515 # Cannot insert the value NULL

testArithAbort = (test, setting) ->
  test.expect(5)


  connection.on 'end', (info) ->
    test.done()

# Test that the default setting for DATEFIRST is 7
exports.testDatefirstDefault = (test) ->
  testDateFirstImpl(test, undefined)

# Test that the DATEFIRST setting can be changed via an optional configuration
exports.testDatefirstCustom = (test) ->
  testDateFirstImpl(test, 3)
