* The directory files/pdf/Fri, 04 has been created.
   * The directory files/pdf/Fri, 04/04 has been created.
   * The directory files/pdf/Fri, 04/04/2008 - 04:42 has been created.

This is the file directory structure that is produced by ImageField when I upload a new image to it. I have the token set as [date-in-tz]. It would make much more sense to have it put the file in this directory structure /2008/04/02

Comments

jaydub’s picture

The token module really should add more time/date related tokens to the
'global' category. There already is the [site-date] token but that's a full
date. It would be nice to add in the sub parts of the [site-date] so that
more could be done in yours and others cases.

maybe add in

  $tokens['global']['site-date-yyyy']   = t("Current date year (four digit)");
  $tokens['global']['site-date-yy']     = t("Current date year (two digit)");
  $tokens['global']['site-date-month']  = t("Current date month (full word)");
  $tokens['global']['site-date-mon']    = t("Current date month (abbreviated)");
  $tokens['global']['site-date-mm']     = t("Current date month (two digit, zero padded)");
  $tokens['global']['site-date-m']      = t("Current date month (one or two digit)");
  $tokens['global']['site-date-ww']     = t("Current date week (two digit)");
  $tokens['global']['site-date-date']   = t("Current date date (day of month)");
  $tokens['global']['site-date-day']    = t("Current date day (full word)");
  $tokens['global']['site-date-ddd']    = t("Current date day (abbreviation)");
  $tokens['global']['site-date-dd']     = t("Current date day (two digit, zero-padded)");
  $tokens['global']['site-date-d']      = t("Current date day (one or two digit)");
quicksketch’s picture

Project: ImageField » Token
Version: 5.x-2.0-rc6 » 5.x-1.x-dev
Category: bug » support
Status: Active » Closed (fixed)

This has nothing to do with Image field directly. The tokens you are using simply output in that format. If you need a specific token that is not yet exposed to token module, you can implement a custom module to expose any tokens you can imagine. However, since this isn't an imagefield request, I'm moving to Token and closing the issue.

AdrianB’s picture

There's a patch here for this that works: http://drupal.org/node/236596#comment-869358