[erlang-questions] strftime for formatting dates and times

Adam Lindberg adam@REDACTED
Tue Jun 21 17:28:41 CEST 2011


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
>
> 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
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list