Januk Aggarwal’s macros forwarded to TBUDL
(The Bat! Users Discussion List)

TBUDL archives are at http://tbudl.thebat.dutaint.com

From:   Avenarius <aam@avenarius.sk>
To:   TBUDL@thebat.dutaint.com
Date:   Wednesday, July 25, 2001, 18:02:07 (GMT +0200)
Subject:   Fwd: Re: Formatting in GMT conversion

Hi Bat-fellows,

some people call it monstrosity, some would call it a work of art.
Look at what Januk Aggarwal sent me off-list -- it's imperative to
share it with you.

Januk can't possibly realize what he's just accomplished. Slovak and
Czech Bat users have often expressed their sorrow that TB's time stamp
macros do not declinate words like "Sunday, Wednesday, February,
March" etc. etc. In Slovak, Russian, and other Slavonic languages the
basic form of such words needs to attach a suffix in the grammatical
context of "25 July 2001". I. e., "Today is 25. júl" but "You wrote
your message on 25. júla". (The suffix "-a" performs the same function
here that the preposition "on" performs in English; therefore in
Slavonic languages you actually say "You wrote this 25. júla" -- no
preposition is used.)

Thanks to Januk's work it will now finally be possible to let all the
declension be done automatically by TB!

It will take me a while to sort these things out and set up everything
properly, but the astonishing thing is that the template (see below)
that Januk kindly constructed can now be used for *any* language for
either GMT conversion or declension of days of week / months.

Many thanks to Januk,
Alex. of Slovakia

This is a forwarded message

From:   Januk Aggarwal <januk@canada.com>
To:   Avenarius <a@avenarius.sk>
Date:   Wednesday, July 25, 2001 at 04:30:31 (GMT -0700)
Subject:   Re: Formatting in GMT conversion

===8<==============Original message text===============

Hello Avenarius,

Historians believe that Wednesday, 25 Jul 2001 at 11:09 GMT +0200 was when,
Avenarius [A] typed the following:

A>> Could an analogous method be somehow combined with the day
A>> conversion to convert "Jul" to "July", "Apr" to "April", etc.?

Sorry, I didn't get the message you quoted here. But absolutely, you
can do an analogous thing:

Get the month in a quick template called Date-Month

<begin Date-Month regexp>
<\end Date-Month regexp>
While we're at it, we need to create templates for the day of month
and year:
<begin Date-DOM>
<\end Date-DOM>

<begin Date-Year>
<\end Date-Year>
And from last time:
<begin Date-Day>
<\end Date-Day>
So the final Date template is this monstrosity. You might want to
split it up into some smaller QT's if you like:
<begin Date>
%REM="Do the translation of the weekday"%-
%IF:"%QINCLUDE=""Date-Day"""="Sat":"Saturday":"", %-
%REM="Include date"%-
%REM="Do Month translation"%-
%IF:"%QINCLUDE=""Date-Month"""="Dec":"December":"" %-
%REM="Add in Year"%-
<\end Date>
Now running the Date quick template gives me:
Wednesday, 25 July 2001

Thanks for writing,
Januk Aggarwal

Using The Bat! 1.54 Beta/4 under Windows 98 4.10 Build 2222 A

This page intentionally left unblank.

===8<===========End of original message text===========

[flying with The Bat! 1.54 Beta/4
under Windows 98 4.10 Build 2222 A
amd k6-2 500 mhz processor with 128 mb ram]

home counter
Visit Avenarius’ Book of Quotations