Edgewall Software

Changes between Version 31 and Version 32 of MacroBazaar


Ignore:
Timestamp:
Dec 21, 2004, 10:53:12 PM (19 years ago)
Author:
anonymous
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • MacroBazaar

    v31 v32  
    203203''By:'' Simon Stapleton <simon@tufty.co.uk>
    204204
     205=== DateOffset ===
     206
     207Returns the date referred to as follows:
     208 * First arg is the offset, i.e. the date to start from
     209 * Second arg is the multiplier to multiply the count by (e.g. 7 for a week)
     210 * Third arg is the count (i.e. the number of additions to make).
     211
     212So, for example:
     213 * {{{ [[DateOffset(2005/01/05,7,0)]] }}} returns Wed Jan 05
     214 * {{{ [[DateOffset(2005/01/05,7,4)]] }}} returns Wed Feb 02
     215
     216You can also configure the input and output date formats. (See http://python.org/doc/2.3.4/lib/module-time.html).  e.g.:
     217 * {{{ [[DateOffset(01/05/2005,7,0,%m/%d/%Y,%A %B %d)]] }}} returns Wednesday January 05
     218
     219Please email me fixes and excuse any obvious errors: I've never written any python before this.
     220
     221''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/DateOffset.py
     222''Version:'' 0.8
     223''By:'' Muness Alrubaie <muness@gmail.com>
     224
     225
    205226''Add your macro here ...''
    206227