User login

There's more than one way to span a date...

In theory you can put HTML code right into a custom date format declaration. Actually, this did not quite work for some reason... somewhere in class year the code just gave up and pled for mercy.

\<\d\i\v \c\l\a\s\s\="\m"\>M\<\/\d\i\v\>\<\d\i\v \c\l\a\s\s\="\d\y"\>d\<\/\d\i\v\>\<\d\i\v \c\l\a\s\s\="\y\r"\>Y\<\/\d\i\v\>

Borrowing basic code structure from
http://www.opensourcery.com/blog/dylan-tack/quick-custom-cck-date-formatter

And meeting the specific request of a comment there, in fact.

Submitted as a sub-module to http://drupal.org/project/cck_formatters

It is currently posted as a patch here: Provide date field formatted into three spanned elements (month, day, year) ready for CSS to make it into a nice date block

Maybe mention here, the Date/Calendar section of the Site Building Guide
http://drupal.org/node/262062 (have not yet)

Searched words: 
span div around date to format month year day in nice block-like style drupal date module views formatter span day year month

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.