Commit a4c585c0598fcdee68e9594ef9118f951d8c5a67

Authored by Marius Hanne
1 parent 050ec49e77
Exists in master

formatting help

Showing 2 changed files with 72 additions and 0 deletions Side-by-side Diff

app/views/fucking_time/format.html.haml
  1 +%h1 Formatting Help
  2 +
  3 +%p Here is a list of the possible formatting codes.
  4 +
  5 +%table
  6 + %tr
  7 + %th %a
  8 + %td The abbreviated weekday name (``Sun'')
  9 + %tr
  10 + %th %A
  11 + %td The full weekday name (``Sunday'')
  12 + %tr
  13 + %th %b
  14 + %td The abbreviated month name (``Jan'')
  15 + %tr
  16 + %th %B
  17 + %td The full month name (``January'')
  18 + %tr
  19 + %th %c
  20 + %td The preferred local date and time representation
  21 + %tr
  22 + %th %d
  23 + %td Day of the month (01..31)
  24 + %tr
  25 + %th %H
  26 + %td Hour of the day, 24-hour clock (00..23)
  27 + %tr
  28 + %th %I
  29 + %td Hour of the day, 12-hour clock (01..12)
  30 + %tr
  31 + %th %j
  32 + %td Day of the year (001..366)
  33 + %tr
  34 + %th %m
  35 + %td Month of the year (01..12)
  36 + %tr
  37 + %th %M
  38 + %td Minute of the hour (00..59)
  39 + %tr
  40 + %th %p
  41 + %td Meridian indicator (``AM'' or ``PM'')
  42 + %tr
  43 + %th %S
  44 + %td Second of the minute (00..60)
  45 + %tr
  46 + %th %U
  47 + %td Week number of the current year, starting with the first Sunday as the first day of the first week (00..53)
  48 + %tr
  49 + %th %W
  50 + %td Week number of the current year, starting with the first Monday as the first day of the first week (00..53)
  51 + %tr
  52 + %th %w
  53 + %td Day of the week (Sunday is 0, 0..6)
  54 + %tr
  55 + %th %x
  56 + %td Preferred representation for the date alone, no time
  57 + %tr
  58 + %th %X
  59 + %td Preferred representation for the time alone, no date
  60 + %tr
  61 + %th %y
  62 + %td Year without a century (00..99)
  63 + %tr
  64 + %th %Y
  65 + %td Year with century
  66 + %tr
  67 + %th %Z
  68 + %td Time zone name
  69 + %tr
  70 + %th %%
  71 + %td Literal ``%'' character
app/views/fucking_time/index.html.haml
... ... @@ -17,6 +17,7 @@
17 17 = time_zone_select :fucking, :time_zone, nil, :default => @opts[:time_zone], :include_blank => true
18 18 = label_tag :time_format, "Format:"
19 19 = text_field_tag :time_format, @opts[:time_format]
  20 + = link_to "(help)", :action => 'format'
20 21 = submit_tag "UPDATE"
21 22  
22 23 %ul#footer