Re: [greenstone-users] Format date

From Katherine Don
DateTue, 31 Oct 2006 15:51:08 +1300
Subject Re: [greenstone-users] Format date
In-Reply-To (7-0-1-0-2-20061029142045-044477d0-namweb-com-na)
Hi Renate

The smart formatting is currently only set up to handle Date and
Language metadata. The namespace doesn't matter, but the metadata field
name does.

When Date is used, the output becomes _format:date_(yyyy,mm,dd)
The library c++ code works out the yyyy, mm dd bits, then uses a macro
to do the outputting.
This macro is defined in base.dm.

With an arbitrary metadata, the output becomes _format:metaname_(metavalue).
You can implement a macro to resolve this. It will be a bit more
difficult than the normal date one as you will need to use javascript to
break the date up into years, month and day.

At the bottom of base.dm, (in the format package) add
_exp.DateOfMeeting_ { content }
The argument passed in is stored in the _1_ variable.

Regards,
Katherine

Renate Morgenstern wrote:
> Hi,
>
> The smart formatting of the date works fine with extracted date.
> However, I have a field in an ISIS database in the format YYYYMMDD, and
> it is exploded. But when I use format:exp.DateOfMeeting the display
> looks like this:
>
> 2006 April open this document and view contents
> <http://127.0.0.1:1025/gsdl?e=d-000-00-meetings--00-2--0--0prompt-10---4-------0-1l--10hC6-en-50---20-about---00-3-1-00-01-1unam-0utfZz-8-00&a=d&cl=CL4.6.1&d=HASH539ddaf334296d293228c7>
> Library General Staff Meeting _format:exp.DateOfMeeting_(20060407)
> open this document and view contents
> <http://127.0.0.1:1025/gsdl?e=d-000-00-meetings--00-2--0--0prompt-10---4-------0-1l--10hC6-en-50---20-about---00-3-1-00-01-1unam-0utfZz-8-00&a=d&cl=CL4.6.1&d=HASH013df43d2d3245411f52e955> Postgraduate
> Studies Committee _format:exp.DateOfMeeting_(20060424)
> open this document and view contents
> <http://127.0.0.1:1025/gsdl?e=d-000-00-meetings--00-2--0--0prompt-10---4-------0-1l--10hC6-en-50---20-about---00-3-1-00-01-1unam-0utfZz-8-00&a=d&cl=CL4.6.1&d=HASH018ecba22821d664e610c954> Postgraduate
> Studies Committee _format:exp.DateOfMeeting_(20060424)
>
> Where is the mistake?
>
> Thanks
> Renate
>
> Mrs. Renate Morgenstern
> P O Box 30664, Windhoek
> Tel/Fax: 242124 (H); 2063869 (W)
> University of Namibia Library
> Head: Technical Services and Systems
> Private Bag 13301, Windhoek, Namibia
> http://www.cds-isis.org.na
> <http://www.cds-isis.org.na/> http://www.unam.na/ilrc/library/index.html
>
>
> ------------------------------------------------------------------------
>
>
>
> Internal Virus Database is out-of-date.
> Checked by AVG Free Edition.
> Version: 7.1.408 / Virus Database: 268.13.7/488 - Release Date: 10/19/2006
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users