[erlang-questions] strftime for formatting dates and times

Dale Harvey <>
Tue Jun 21 19:26:19 CEST 2011


Jinx :)

https://github.com/daleharvey/dh_date/blob/master/src/dh_date.erl (date
formatter + parser)

Cheers
Dale

On 21 June 2011 18:20, Zsolt Keszthelyi <> wrote:

> +1 for adding it to calendar   (I keep having to use some partial solution)
> Are you planning to do a parser also (parse date string to datetime tuple)?
> That would really make it complete.
>
> Zsolt
>
>
> On Tue, Jun 21, 2011 at 11:28 AM, Adam Lindberg <
> > wrote:
>
>> Would love this being integrated into calendar! (Or appropriate module,
>> although I think calendar should be the one)
>>
>> Cheers,
>> Adam
>>
>>
>>
>> Kenny Stone wrote:
>>
>>> https://github.com/kennystone/**strftimerl<https://github.com/kennystone/strftimerl>
>>>
>>> I literally copied ruby's strftime docs into the readme and implemented
>>> (almost) each type of formatting.
>>>
>>> I'm considering patching the calendar module with this functionality.
>>>  Thoughts?
>>>
>>> strftime:f(now(), "Printed on %m/%d/%Y").    %=> "Printed on 11/19/2007"
>>> strftime:f(now(), "at %I:%M%p").             %=> "at 08:37AM"
>>> strftime:f(now(), "at %I:%M%p", universal).  %=> "at 02:37PM"
>>> strftime:f(now(), "%D-%T.%N").               %=>
>>> "11/19/2007-08:38:02.445443"
>>>
>>> -Kenny
>>>
>>> ______________________________**_________________
>>> erlang-questions mailing list
>>> 
>>> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
>>>
>> ______________________________**_________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
>>
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110621/36260c0e/attachment.html>


More information about the erlang-questions mailing list