Skip to content

Menu

  • About me
  • my github

tom's blog

some thoughts…

Tag: date format

custom date/time formatting with i18n

March 22, 2009February 16, 2013 by Tom

in helper

def show_date(date)
  return '' if date.nil? || date==0
  l(Time.at(date), :format => :ddate)
end

in config/locale/en.yml (for example)

date:
  formats:
  ddate: %d.%m.%Y
Posted in programming, ruby/railsTagged date format, i18n, programming, rails, ruby

Tags

advertisement ajeto buffering c++ capacitor cleaning cnc date format dokumenty dovecot dum projekt stavba flowers hardware i18n imaps iPhone linux logo magazine mailserver palm pantyhose phone programming pspdfkit rails repair ruby rubymotion safety seat belt sklo sklárna slackware sportka ssl stavba tls tools trip tulips turbo ultrasound utf8 xinetd

Categories

  • bike (3)
  • cooking (14)
  • embedded (1)
  • flying (8)
    • Heli (2)
    • plastics (3)
  • General (1)
  • hadoop (1)
  • hardware (2)
  • movies (1)
  • můj dům, můj hrad (13)
    • inteligentní dům (5)
      • Foxtrot (1)
    • projekt (1)
    • úředničina (4)
  • mysql (1)
  • nodemcu (2)
  • other stuffs (4)
    • pantyhose (4)
  • photo (15)
  • press (4)
  • programming (63)
    • c++ (1)
    • iPhone (4)
    • logo (msw/fms) (1)
    • lua (3)
    • MCU (2)
    • palm (6)
    • R (2)
    • ruby/rails (27)
    • rubymotion (9)
  • rhino3d (2)
  • Smoothie (1)
  • trips (5)
  • tutorials (7)
    • ruby (7)
  • unix (17)
  • unsortables (30)
  • Vinohrad (1)
Powered by WordPress. Landscape by Diverse Themes.