[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: date.js in Lua?
- From: Alexander Gladysh <agladysh@...>
- Date: Tue, 20 Mar 2012 02:52:22 +0400
On Tue, Mar 20, 2012 at 02:41, Matthew Wild <mwild1@gmail.com> wrote:
> On 19 March 2012 22:32, Alexander Gladysh <agladysh@gmail.com> wrote:
>> On Tue, Mar 20, 2012 at 02:22, Matthew Wild <mwild1@gmail.com> wrote:
>>> http://code.matthewwild.co.uk/ndp/
>> Also, I see no tests on bad input. (Okay, okay, work in progress, no
>> problem :-) )
>
> You're right :)
And a rockspec file would be nice :-)
>>> I realise I've neglected licence info (MIT of course), so I'll add that now.
>>
>> That's the reason why this is not an open-source project, not hosting
>> :-) Please do.
>
> Done.
Thank you!
> PS. Just saw your incoming mail. Indeed it would be good to parse
> standard date formats as well as natural language ones. I know I
> wasn't sure how to sensibly handle DD-MM / MM-DD issues, which is
> probably one reason I avoided it.
Should be configurable, probably, with, say, DD-MM first as a default.
(Note that both formats should be tried.)
Or look at `locale LC_TIME -k` and take first format from there. (Best
to do that without os.execute, of course, to be somewhat portable.)
Alexander.