ietf-mta-filters
[Top] [All Lists]

variables: open issue a) date variables

2003-05-01 16:04:18

there are a few open issues mentioned in the draft.  I'm sure there
should be more listed, so please remind me of what I have forgotten or
glossed over.  in any case, I think it is time to try to get them
resolved.  the first one is quite trivial:

  a) should we include more predefined variables to access the time?
     (weekday, week number (US, EU and/or ISO?), name of month, name
     of weekday, ...)  could use strftime(3c) as a list of what to
     offer, but the names should be in English.

the current list is ${year} ${month} ${day} ${hour} ${minute}
${second} ${timezone}, all numeric and zero-padded.

I don't like adding variables with values in natural language, since
that adds internationalisation problems for little gain.
unfortunately, both weekday and week have localisation problems.

strftime(3c) solves this by supplying many conversion specifiers,
i.e. %U, %V and %W for three methods of computing the week number.  I
feel we would need to select one of these (and then the ISO
definitions is the obvious candidate), after all having one is better
than none.

for the weekday, while 0..6 with 0 meaning Sunday may seem alien to
many users (including me :), at least the information is available in
an unambigious fashion.

so my suggestion is to augment the list with the following:

  ${weekday}   (0..6)       %w: 0 is Sunday
  ${week}      (01..53)     %V: week number according to ISO 8601
  ${isoyear}   (0000..9999) %G: year number according to ISO 8601.  
                                needed since Jan 1 2000 is in week 52 
                                of 1999

my reasoning is that this is useful information for some people, and
it is easy to implement.

-- 
Kjetil T.