KOMA scrlttr2 date customization

Showing 1-13 of 13 messages
KOMA scrlttr2 date customization Haines Brown 12/30/12 6:33 AM
I have a KOMA-Script template for personal letters set up, but would like to
customize the letter date (\usepackage{scrdate} is in the .lco file).

I have no problem with this customization:

  \setkomavar{date}{\todaysname, \ISOToday}

but instead of \ISOToday, I want something like the \dategerman format
so that the date appears like this:

  Sunday, 2012.12.30

The \dategerman requires some kind of language specification, but the
KOMA-Script manual looses me. At present I have only:

  \setmainlanguage{english}

In (Xe)LaTeX I do something like it with this:

  \usepackage[nodayofweek]{datetime}
  \renewcommand{\dateseparator}{.}

But I've not been able to use the command in KOMA-Script.

Haines Brown

Re: KOMA scrlttr2 date customization Axel Berger 12/30/12 3:12 PM
Haines Brown wrote:
> I want something like the \dategerman format
> so that the date appears like this:
>   Sunday, 2012.12.30

Two points:
a) That is nothing like any German date format ever used.
b) The "German" date format (30.\,12.~2012) has been illegal in Germany
for decades, as there is a requirement to abide by DIN and ISO
standards, though this has been totally ignored so far, mostly by public
servants, who very obviously consider themselves above the law.

I suggest using ISO or as a second choice some traditional commonly used
format, but NOT an idiosyncratic one you've thought up yourself.

Axel
Re: KOMA scrlttr2 date customization Haines Brown 12/30/12 7:15 PM
Axel, interesting. In the KOMA-Script manual (en), p. 313, all the date
commands put the date last. This strikes me as odd, if as you say there
is a clear standard in Germany. I hope the "Sunday," prepend does not
violate the ISO standard because, for it just adds info not part of the
date format, similarly to prepending the sender's city. ISO 8601
suggests numbering the week day preceeded by W, but I'm sure that would
confuse most readers. In any case, heeding your advice I'll stick with
ISO 8601 rather than impose period separators.

Thanks,

Haines


Re: KOMA scrlttr2 date customization GL 12/30/12 11:33 PM
Le 31/12/2012 04:15, Haines Brown a �crit :
> Axel Berger <Axel.Berger@Gmx.De> writes:
>
>> Haines Brown wrote:
>>> I want something like the \dategerman format
>>> so that the date appears like this:
>>>    Sunday, 2012.12.30

You may also consider the datetime package by N Talbot,
and the \newdateformat and \newdate commands.

http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/datetime.html

Regards.
Re: KOMA scrlttr2 date customization Axel Berger 12/31/12 7:10 AM
Haines Brown wrote:
> In the KOMA-Script manual (en), p. 313, all the date
> commands put the date last.

Strange. In mine, version of 2012-05-15, all of them except American
have the order dd mm yyyy. This even seems wrong to me at least for some
cases. The old MS-DOS setups had Norwegian as identical to what now has
become ISO, so either Bill Gates or Markus Kohm has to be wrong.
Normally I'd always go for the former but not in this case.

Axel
Re: KOMA scrlttr2 date customization GL 12/31/12 8:14 AM
Le 31/12/2012 16:10, Axel Berger a �crit :
Markus Kohm is like an architect who would like to rebuild Babylon on
its own.

Bill Gates is the richest man in the world (for memory...)
Re: KOMA scrlttr2 date customization Markus Kohm 12/31/12 9:30 AM
Axel Berger (Montag, 31. Dezember 2012 00:12):

> b) The "German" date format (30.\,12.~2012) has been illegal in Germany
> for decades

Nonsense. There's no date law in Germany, so it can't be illegal and the
date format of DUDEN, "Richtlinien für den Schriftsatz" is still:

| Bei Datumsangaben in Ziffern setzt man einen Punkt nach den Zahlen für
| Tag und Monat. Die Jahresangabe steht ohne Punkt.

| Zwischen Tag und Monat wird ein kleiner Zwischenraum, vor dem Jahr ein
| normaler Wortabstand gesetzt.

This is exactly: 31.\,12.~2012

BTW: Most of the numeric date definitions are made by nativ speakers. Norsk
date setting, e.g., was a suggestion of Sveinung Heggen.

A possible english date with day may be:

\documentclass[numericaldate]{scrlttr2}
\usepackage[british]{babel}
\usepackage{scrdate}
\begin{document}
\setkomavar{date}{\todaysname, \today}
\begin{letter}{test}
\opening{Hello}
\closing{Bye}
\end{letter}
\end{document}

or

\documentclass[numericaldate]{scrlttr2}
\usepackage[american]{babel}
\usepackage{scrdate}
\begin{document}
\setkomavar{date}{\todaysname, \today}
\begin{letter}{test}
\opening{Hello}
\closing{Bye}
\end{letter}
\end{document}

or the wanted:

\documentclass[numericaldate]{scrlttr2}
\usepackage[american]{babel}
\newcommand*{\mytoday}{%
  \the\year.\ifnum\month<10 0\fi\the\month.\ifnum\month<10 0\fi\the\day
}

\usepackage{scrdate}
\begin{document}
\setkomavar{date}{\todaysname, \mytoday}
\begin{letter}{test}
\opening{Hello}
\closing{Bye}
\end{letter}
\end{document}

Markus Kohm
--
KOMA-Script, a versatile bundle of classes and packages for LaTeX2e
Current: KOMA-Script 3.11b (see <http://www.komascript.de/release> in
German)

Re: KOMA scrlttr2 date customization Robin Fairbairns 1/1/13 9:34 AM
GL <goua...@gmail.com> writes:

> Le 31/12/2012 16:10, Axel Berger a écrit :
>> Haines Brown wrote:
>>> In the KOMA-Script manual (en), p. 313, all the date
>>> commands put the date last.
>>
>> Strange. In mine, version of 2012-05-15, all of them except American
>> have the order dd mm yyyy.

the year-month-day format has the advantage of being "computer kind".
i'm getting to be more and more computer-like in my old age (e.g., i
crash a lot) and have used that format for ages.

(i find the american format confusing; allegedly, one of the salesmen at
my previous job "lost" a sale because of american format dates.)

>> This even seems wrong to me at least for some
>> cases. The old MS-DOS setups had Norwegian as identical to what now has
>> become ISO, so either Bill Gates or Markus Kohm has to be wrong.
>> Normally I'd always go for the former but not in this case.

i don't think m$'s styles help the argument.

> Markus Kohm is like an architect who would like to rebuild Babylon on
> its own.

he does it quite well, imo.  were i still creating latex documents, i
would be using the scr* stuff.

> Bill Gates is the richest man in the world (for memory...)

possibly he was, once, but istm he's giving money away faster even than
a crooked banker, now.  if he didn't have m$ on his conscience, he would
be undoubtedly one of the good guys...
--
Robin Fairbairns, Cambridge
sorry about all this posting.  i'll go back to sleep in a bit.
Re: KOMA scrlttr2 date customization GL 1/1/13 9:48 AM
Le 01/01/2013 18:34, Robin Fairbairns a écrit :
> GL <goua...@gmail.com> writes:
>
>> Le 31/12/2012 16:10, Axel Berger a écrit :
>>> Haines Brown wrote:
>>>> In the KOMA-Script manual (en), p. 313, all the date
>>>> commands put the date last.
>>>
>>> Strange. In mine, version of 2012-05-15, all of them except American
>>> have the order dd mm yyyy.
>
> the year-month-day format has the advantage of being "computer kind".
> i'm getting to be more and more computer-like in my old age (e.g., i
> crash a lot) and have used that format for ages.

lol !
My old i7 does not crash so much, much less than my older core-2-duo.

This also means that in your old age, your power doubles each couple of
years, you old devil Robin ! ;-)

Re: KOMA scrlttr2 date customization Markus Kohm 1/1/13 11:45 AM
Robin Fairbairns (Dienstag, 1. Januar 2013 18:34):

> he does it quite well, imo.

Many thanks. I've had more than 18 years to build and improve KOMA-Script
(more than 10 years with scrlttr2).
Re: KOMA scrlttr2 date customization rsh 1/7/13 3:03 PM
And I used the recommendation from  The Language Council of Norway, (www.sprakradet.no) which obviously has better knowledge of the Norwegian language than most of us. That said, you have several ways to write a date in Norwegian. 13 January can be written:

13.1., 13.01., 13.1.13, 13.01.13, 13.1.2013, 13.01.2013, 13. januar 13 or
13. januar 2013.

Pick and choose.

Sveinung Heggen
Re: KOMA scrlttr2 date customization Axel Berger 1/9/13 5:34 AM
rsh wrote:
> And I used the recommendation from  The Language Council of Norway,

You are of course both right. The setup I actually use in my CONFIG.SYS
is 046=Sweden, not Norway, my mistake.

What remains is a less than optimal choice in Komascript, see
http://en.wikipedia.org/wiki/Date_format_by_country

"National standard format is yyyy-mm-dd;[142] casually many people use
d/m yyyy or d/m -yy. Another possible format is d.m.yyyy.[143]"

I would have preferred the official over the casual format.

Axel
Re: KOMA scrlttr2 date customization Markus Kohm 1/9/13 6:22 AM
Axel Berger (Mittwoch, 9. Januar 2013 14:34):

> I would have preferred the official over the casual format.

Very easy:

\documentclass{scrlttr2}
\usepackage[swedish]{babel}
\usepackage{scrdate}
\setkomavar{date}{\ISOToday}
\begin{document}
\begin{letter}{you\\there}
\opening{Hi}