Module: ClientDate

Defined in:
lib/client_date.rb

Instance Method Summary collapse

Instance Method Details

#format_date(date) ⇒ Object



2
3
4
5
# File 'lib/client_date.rb', line 2

def format_date(date)
  return "" if date.nil?
  assemble_javascript(date,"fd")
end

#format_datetime(date, seconds = false) ⇒ Object



7
8
9
10
11
# File 'lib/client_date.rb', line 7

def format_datetime(date,seconds=false)
  return "" if date.nil?
  function = seconds ? "fdts" : "fdt"
  assemble_javascript(date,function)
end