Skip to content

Instantly share code, notes, and snippets.

@Flard
Created January 15, 2013 19:43

Revisions

  1. Flard created this gist Jan 15, 2013.
    45 changes: 45 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    format_date

    == tokens ==
    G Era
    y year
    M mon
    d mday
    h Hour12
    H hours
    m minutes
    s seconds
    E wday
    D yday
    F DayInMonth
    w WeekInYear
    W WeekInMonth
    a AMPM
    k HourInDay
    K HourInAMPM
    z TimeZone

    == formats ==
    d ShortDatePattern
    D LongDatePattern
    p MediumDatePattern
    P FullDatePattern
    t ShortTimePattern
    T LongTimePattern
    q MediumTimePattern
    Q FullTimePattern
    f LongDatePattern ShortTimePattern
    F LongDatePattern LongTimePattern
    g ShortDatePattern ShortTimePattern
    G ShortDatePattern LongTimePattern
    i yyyy-MM-dd
    I yyyy-MM-dd HH:mm:ss
    M MMMM dd
    m MMMM dd
    r EEE, dd MMM yyyy HH:mm:ss
    R EEE, dd MMM yyyy HH:mm:ss
    s yyyy-MM-ddTHH:mm:ss
    u yyyy-MM-dd HH:mm:ss z
    U EEEE dd MMMM yyyy HH:mm:ss
    Y yyyy MMMM
    y yyyy MMMM