   Logger.log.apply Logger, arguments if trace
   return
 
+# active sheet is in position 0
+getActiveSheet = () ->
+  ss = SpreadsheetApp.getActiveSpreadsheet()
+  return ss.getSheets()[0]
+
 setupNewRow = (range) ->
   dest = range
   row = range.getRow()

        (nm == om and
          (nd <= od))))

# A column contains current year/month/day or further in the future
isMaxRowCurrent = (sheet) ->
  n = new Date()
  cell  = "A#{sheet.getMaxRows()}"
  t = sheet.getRange(cell).getValue()
  dump "isMaxRowCurrent sheet '%s:%s' dates ['%s', '%s']",
    sheet.getName(), cell, n, t
  if t is ''
    return false

  .after 1
  .create()
  dump "Enabling one shot test time trigger."
  flushLog()
  return

testErrorTrigger = () ->
