class Fugit::Cron

def weekday_match?(nt)

def weekday_match?(nt)
  return true if @weekdays.nil?
  wd, hsh = @weekdays.find { |d, _| d == nt.wday }
  return false unless wd
  return true if hsh.nil?
  phsh, nhsh = nt.wday_in_month
  if hsh > 0
    hsh == phsh # positive wday, from the beginning of the month
  else
    hsh == nhsh # negative wday, from the end of the month, -1 == last
  end
end