2b92c9f1fdc3

Initial commit.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Tue, 08 Mar 2011 13:08:24 -0500
parents 9fc7cfb73aff
children 32936e930fa6
branches/tags (none)
files .gitignore README.markdown doc/strftimedammit.txt

Changes

--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.gitignore	Tue Mar 08 13:08:24 2011 -0500
@@ -0,0 +1,1 @@
+doc/tags
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.markdown	Tue Mar 08 13:08:24 2011 -0500
@@ -0,0 +1,24 @@
+Strftimedammit is a single Vim documentation file that lists strftime-like
+formatting characters for a variety of languages.
+
+It was born when I finally got sick of having to open a browser with the
+Django docs to look up how to use its date formatting template filter.
+
+Usage
+-----
+
+Install with [Pathogen](http://www.vim.org/scripts/script.php?script_id=2332).
+
+Make sure you `:call pathogen#helptags()` after installing to make Vim notice
+the new documentation file.
+
+Now you can use `:help strftimedammit` to open the documentation.
+
+There are also tags in place for each language, so you can do
+`:help strftime-python` or `:help strftime-django` to go right to that
+section.
+
+Contributing
+------------
+
+Add your favorite language to the doc file, fork, and send a pull request.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/strftimedammit.txt	Tue Mar 08 13:08:24 2011 -0500
@@ -0,0 +1,144 @@
+*strftimedammit.txt*   Strftime Documentation for various formats
+
+==============================================================================
+CONTENTS                                             *strftimedammit-contents*
+
+    1. Python .......................... |strftime-python|
+    2. Django .......................... |strftime-django|
+
+==============================================================================
+1. Python                                                    *strftime-python*
+
+Times >
+    %H  Hour (24-hour clock) as a decimal number                      00 to 23
+    %I  Hour (12-hour clock) as a decimal number                      01 to 12
+
+    %M  Minute as a decimal number                                    00 to 59
+    %S  Second as a decimal number                                    00 to 61
+
+    %p  Locale's equivalent of either AM or PM                              AM
+<
+
+Days >
+    %a  Abbreviated weekday name                                           Wed
+    %A  Full weekday name                                            Wednesday
+
+    %d  Day of the month as a decimal number                          01 to 31
+    %j  Day of the year as a decimal number                         001 to 366
+
+    %w  Weekday as a decimal number                            0 (Sunday) to 6
+<
+
+Months >
+    %b  Abbreviated month name                                             Oct
+    %B  Full month name                                                October
+
+    %m  Month as a decimal number                                     01 to 12
+<
+
+Weeks >
+    %U  Week number of the year (Sunday as the first day of the       00 to 53
+        week) as a decimal number. All days in a new year
+        preceding the first Sunday are considered to be in week 0.
+
+    %W  Week number of the year (Monday as the first day of the       00 to 53
+        week) as a decimal number. All days in a new year
+        preceding the first Monday are considered to be in week 0.
+<
+
+Years >
+    %y  Year without century as a decimal number                            11
+    %Y  Year with century as a decimal number                             2011
+<
+
+Combinations >
+    %x  Locale's appropriate date representation
+    %X  Locale's appropriate time representation
+    %c  Locale's appropriate date and time representation
+<
+
+Others >
+    %Z  Time zone name (no characters if no time zone exists)
+    %%  A literal '%' character                                              %
+<
+==============================================================================
+1. Django                        *strftime-django* *django-date* *django-time*
+
+Times >
+    H  Hour, 24-hour format                                           00 to 23
+    G  Hour, 24-hour format without leading zeros                      0 to 23
+
+    h  Hour, 12-hour format                                           01 to 12
+    g  Hour, 12-hour format without leading zeros                      1 to 12
+
+    a  a.m. or p.m.                                                       a.m.
+    A  AM or PM                                                             AM
+
+    i  Minutes, 2 digits with leading zeros                           00 to 59
+    s  Seconds, 2 digits with leading zeros                           00 to 59
+    u  Microseconds                                                0 to 999999
+
+    f  Time, in 12-hour hours and minutes, with minutes                1, 1:30
+       left off if they're zero 
+<
+
+Days >
+    z  Day of the year                                                0 to 365
+
+    d  Day of the month, 2 digits with leading zeros                  01 to 31
+    j  Day of the month without leading zeros                          1 to 31
+
+    l  Day of the week, textual, long                                   Friday
+    D  Day of the week, textual, 3 letters                                 Fri
+    w  Day of the week, digits without leading zeros           0 (Sunday) to 6
+
+    S  English ordinal suffix for day of the month              st, nd, rd, th
+<
+
+Months >
+    m  Month, 2 digits with leading zeros                             01 to 12
+    n  Month without leading zeros                                     1 to 12
+
+    F  Month, textual, long                                            January
+    M  Month, textual, 3 letters, capitalized                              Jan
+    b  Month, textual, 3 letters, lowercase                                jan
+    N  Month abbreviation in Associated Press style                       Jan.
+
+    E  Month, locale specific alternative representation
+       usually used for long date representation.
+       'listopada' (for Polish locale, as opposed to 'Listopad')
+<
+
+Weeks >
+    W  ISO-8601 week number of year, with weeks starting on Monday       1, 53
+<
+
+Years >
+    y  Year, 2 digits                                                       99
+    Y  Year, 4 digits                                                     1999
+<
+
+Combinations >
+    c  ISO 8601 Format                              2008-01-02T10:30:00.000123
+    r  RFC 2822 formatted date                 Thu, 21 Dec 2000 16:01:07 +0200
+
+    P  Time, in 12-hour hours, minutes and 'a.m.'/'p.m.',               1 a.m.
+       with minutes left off if they're zero and the                 1:30 p.m.
+       special-case strings 'midnight' and 'noon' if                  midnight
+       appropriate
+
+    O  Difference to Greenwich time in hours                             +0200
+<
+
+Others >
+    Z  Time zone offset in seconds. The offset for timezones
+       west of UTC is always negative, and for those east of
+       UTC is always positive
+
+    U  Seconds since the Unix Epoch (January 1 1970 00:00:00 UTC)
+
+    T  Time zone of this machine                                           EST
+    t  Number of days in the given month                              28 to 31
+    L  Boolean for whether it's a leap year                      True or False
+<
+==============================================================================