[Nottingham] A little help with date

Danny King dannyking at gmail.com
Mon Jan 12 11:43:35 UTC 2009


Thanks James I'll attempt that when I have some time!

So far I've achieved a greeting, the day's weather, sunrise time and a
read out of my daily appointments from google calendar using the
excellent commandline tool gcalcli. Very fun indeed!

2009/1/10 James Gibbon <jg at jamesgibbon.com>:
> On Sat, 10 Jan 2009 09:49:52 +0000
> "Danny King" <dannyking at gmail.com> wrote:
>
>> Hello all,
>>
>> After the recent discussion about text to speech software I thought it
>> would be fun and geeky to be greeted with a hello, today's date and
>> the weather (or something). So far I have achieved this using the date
>> command:
>>
>> Good morning Danny, It is 09:47 on Saturday the 10 of January, 2009
>>
>> But I would like the day's number to be read as "tenth", "second",
>> "sixteenth", etc rather than just "ten". Does anyone know how I can
>> get date to output that sort of thing?
>>
>
> I'm unaware of a version of date that supports that, so you might
> store the strings (first, second, third etc) in an array. However you
> wouldn't need all 31. For 21-29 you can use "twenty" + (eg) "first",
> same approach for 30 & 31.
>
>
> James
>
>
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham
>



-- 
- Danny King

Are you a web standards developer that uses open source software? Say
hello, send me a mail! I'm looking for more like us.



More information about the Nottingham mailing list