Omnigraffle Date & Time Formatting

| | Comments (0)

I did a few searches for Omnigraffle date time format and didn’t find any conclusive results. So I created block of test code containing every letter of the alphabet and then used the search results to document each code. There were a few I wasn’t 100% sure of, so please leave a comment if you know more.

Examples

To get Last modified on Friday, September 4 at 01:42 AM, use:

Last modified on <%ModificationDate %A, %B %e at %I:%M %p %>

To get 2005-10-07 01:48, use:

<%Date %Y-%m-%d %H:%M%>

To get Oct 07, 2005, use:

<%Date %b %d, %Y%>

General Codes

  • %c

    Preferred local format

    <%Date %c%> Fri Sep 04 01:50:02 US/Pacific 2009

  • %x

    The language-aware standard date representation.

    <%ModificationDate %x %>
    Thu Sep 03 2009
    
  • %X

    The language-aware time representation.

    <%ModificationDate %X %>
    15:36:49 US/Pacific
    

Time Codes

  • %I

    The two-digit hour on a 12-hour clock padded with a zero if applicable.

    <%ModificationDate %I %> 03

  • %i

    Seems to be an alias of %I (Halp?)

  • %H

    The two-digit 24-hour clock padded with a zero if applicable.

    <%ModificationDate %H %> 16

  • %M

    The two-digits minute padded with a leading zero if applicable.

    <%ModificationDate %M %> 02

  • %S

    The two-digit second padded with a zero if applicable.

    <%ModificationDate %S %> 04

  • %p

    Either AM or PM. Language dependent.

    <%ModificationDate %p %> AM

  • %F

    Three digit miliseconds, range from 000 to 999.

    <%ModificationDate %F %> 845

  • %Z

    Time zone.

    <%Date %Z%> US/Pacific

  • %z

    Timezone offset.

    <%Date %z%> -0700

Date Codes

  • %A

    The full weekday name.

    <%ModificationDate %A %> Thursday

  • %a

    The abbreviated weekday name.

    <%ModificationDate %a %> Thu

  • %B

    The full month name.

    <%ModificationDate %B %> September

  • %b

    The abbreviated month name.

    <%ModificationDate %b %> Sep

  • %m

    The two-digit month padded with a leading zero if applicable.

    <%ModificationDate %m %> 09

  • %e

    The day of the month.

    <%ModificationDate %e %> 9

  • %Y

    The four-digit year.

    <%ModificationDate %Y %> 2009

  • %y

    The two-digit year padded with a leading zero if applicable.

    <%ModificationDate %y %> 01

  • %j

    The three-digit day of the year (ranging from 000 to 364) padded with leading zeroes if applicable.

    <%ModificationDate %j %> 040

  • %w

    The numeric day of the week ranging from 0 to 6 where 0 is Sunday.

    <%ModificationDate %w %> 0


Testing Code

a: <%ModificationDate %a %>  A: <%ModificationDate %A %>
b: <%ModificationDate %b %>  B: <%ModificationDate %B %>
c: <%ModificationDate %c %>  C: <%ModificationDate %C %>
d: <%ModificationDate %d %>  D: <%ModificationDate %D %>
e: <%ModificationDate %e %>  E: <%ModificationDate %E %>
f: <%ModificationDate %f %>  F: <%ModificationDate %F %>
g: <%ModificationDate %g %>  G: <%ModificationDate %G %>
h: <%ModificationDate %h %>  H: <%ModificationDate %H %>
i: <%ModificationDate %i %>  I: <%ModificationDate %I %>
j: <%ModificationDate %j %>  J: <%ModificationDate %J %>
k: <%ModificationDate %k %>  K: <%ModificationDate %K %>
l: <%ModificationDate %l %>  L: <%ModificationDate %L %>
m: <%ModificationDate %m %>  M: <%ModificationDate %M %>
n: <%ModificationDate %n %>  N: <%ModificationDate %N %>
o: <%ModificationDate %o %>  O: <%ModificationDate %O %>
p: <%ModificationDate %p %>  P: <%ModificationDate %P %>
q: <%ModificationDate %q %>  Q: <%ModificationDate %Q %>
r: <%ModificationDate %r %>  R: <%ModificationDate %R %>
s: <%ModificationDate %s %>  S: <%ModificationDate %S %>
t: <%ModificationDate %t %>  T: <%ModificationDate %T %>
u: <%ModificationDate %u %>  U: <%ModificationDate %U %>
v: <%ModificationDate %v %>  V: <%ModificationDate %V %>
w: <%ModificationDate %w %>  W: <%ModificationDate %W %>
x: <%ModificationDate %x %>  X: <%ModificationDate %X %>
y: <%ModificationDate %y %>  Y: <%ModificationDate %Y %>
z: <%ModificationDate %z %>  Z: <%ModificationDate %Z %>

Leave a comment

About this site

The personal website of Beau Smith: Adventure seeker, designer, coder, culinary craftsman, athlete, lover.

Movable Type Plugins

  • Heading Anchors - Provides a template tag modifier to update all html headings with an id and anchor linking to the id.
  • ProCommunity - Three new template sets merging the best of the Community Blog, Community Forum, and the Professional template sets.
  • EntrySetBasename - A utility plugin to assist in setting entry basenames to the value of the dirified entry title.
  • Vanilla - A quiver of template sets focusing on specific features in Movable Type
  • Ghostwriter - Assign credit and get thanks for your assistance. A plugin for selecting Author on Edit Entry/Page screen.
  • TidyTags - A perl script to normalize Movable Type template tags
  • DashOff - Dashboard widget with links to get you where you want quickly.