[linux] Re: Tip om het aantal dagen in een maand te krijgen

Kees Theunissen theuniss op rijnh.nl
Wo mei 3 19:33:23 CEST 2006


On Wed, 3 May 2006, Hugo van der Kooij wrote:

>Chips. Alleen wel beperkt bruikbaar:
>$ date --date="2038-2-1 +1 month -1 day" +%e
>date: invalid date `2038-2-1 +1 month -1 day'
>
>Daar gaat mijn AOW straks.

Dan moet je 'cal' gebruiken in plaats van 'date'.
Dat werkt vanaf het jaar 1 en gaat door tot 9999 volgens de
manpage. Ruim voldoende voor jouw AOW.

kees op pcict9:~/mail$ echo `cal 2 2038` |sed -e 's/^.* //'
28
kees op pcict9:~/mail$ echo `cal 2 2040` |sed -e 's/^.* //'
29

Groeten,

Kees.

-- 
Kees Theunissen
F.O.M.-Instituut voor Plasmafysica "Rijnhuizen", Nieuwegein
E-mail: theuniss op rijnh.nl,     Tel: 030-6096724,     Fax: 030-6031204



More information about the Linux mailing list